aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/regmap.h
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-12-03 12:06:20 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-12-05 08:17:36 -0500
commitbf315173359b2f3b8b8ccca4264815e91f30be12 (patch)
treeeb922a86d595849df02c474e034c855d770abce0 /include/linux/regmap.h
parent50b776fc71c13663eb7434f634f2b796de5c9885 (diff)
regmap: Allow drivers to reinitialise the register cache at runtime
Sometimes the register map information may change in ways that drivers can discover at runtime. For example, new revisions of a device may add new registers. Support runtime discovery by drivers by allowing the register cache to be reinitialised with a new function regmap_reinit_cache() which discards the existing cache and creates a new one. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/linux/regmap.h')
-rw-r--r--include/linux/regmap.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index bebda1481f23..86923a98a766 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -129,6 +129,8 @@ struct regmap *regmap_init_spi(struct spi_device *dev,
129 const struct regmap_config *config); 129 const struct regmap_config *config);
130 130
131void regmap_exit(struct regmap *map); 131void regmap_exit(struct regmap *map);
132int regmap_reinit_cache(struct regmap *map,
133 const struct regmap_config *config);
132int regmap_write(struct regmap *map, unsigned int reg, unsigned int val); 134int regmap_write(struct regmap *map, unsigned int reg, unsigned int val);
133int regmap_raw_write(struct regmap *map, unsigned int reg, 135int regmap_raw_write(struct regmap *map, unsigned int reg,
134 const void *val, size_t val_len); 136 const void *val, size_t val_len);