aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-01-30 14:56:52 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-01-30 16:06:43 -0500
commitc0eb46766d395da8d62148bda2e59bad5e6ee2f2 (patch)
tree9b808ba04041f4f10d08b384b4ad8c608a86df4c /include
parent567e47935a7cddd8e823c73bb8ee0b2805cd4940 (diff)
regmap: Implement managed regmap_init()
Save error handling and unwinding code in drivers by providing managed versions of the regmap init functions, simplifying usage. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/regmap.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index eb93921cdd30..195db51ec79b 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -127,6 +127,14 @@ struct regmap *regmap_init_i2c(struct i2c_client *i2c,
127struct regmap *regmap_init_spi(struct spi_device *dev, 127struct regmap *regmap_init_spi(struct spi_device *dev,
128 const struct regmap_config *config); 128 const struct regmap_config *config);
129 129
130struct regmap *devm_regmap_init(struct device *dev,
131 const struct regmap_bus *bus,
132 const struct regmap_config *config);
133struct regmap *devm_regmap_init_i2c(struct i2c_client *i2c,
134 const struct regmap_config *config);
135struct regmap *devm_regmap_init_spi(struct spi_device *dev,
136 const struct regmap_config *config);
137
130void regmap_exit(struct regmap *map); 138void regmap_exit(struct regmap *map);
131int regmap_reinit_cache(struct regmap *map, 139int regmap_reinit_cache(struct regmap *map,
132 const struct regmap_config *config); 140 const struct regmap_config *config);