summaryrefslogtreecommitdiff
path: root/include/linux/regmap.h
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-01-30 19:56:52 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-01-30 21:06:43 +0000
commitc0eb46766d395da8d62148bda2e59bad5e6ee2f2 (patch)
tree9b808ba04041f4f10d08b384b4ad8c608a86df4c /include/linux/regmap.h
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/linux/regmap.h')
-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,
struct regmap *regmap_init_spi(struct spi_device *dev,
const struct regmap_config *config);
+struct regmap *devm_regmap_init(struct device *dev,
+ const struct regmap_bus *bus,
+ const struct regmap_config *config);
+struct regmap *devm_regmap_init_i2c(struct i2c_client *i2c,
+ const struct regmap_config *config);
+struct regmap *devm_regmap_init_spi(struct spi_device *dev,
+ const struct regmap_config *config);
+
void regmap_exit(struct regmap *map);
int regmap_reinit_cache(struct regmap *map,
const struct regmap_config *config);