aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/regmap.h
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-12-03 17:06:20 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-12-05 13:17:36 +0000
commitbf315173359b2f3b8b8ccca4264815e91f30be12 (patch)
treeeb922a86d595849df02c474e034c855d770abce0 /include/linux/regmap.h
parentregmap: Rename LZO cache type to compressed (diff)
downloadlinux-dev-bf315173359b2f3b8b8ccca4264815e91f30be12.tar.xz
linux-dev-bf315173359b2f3b8b8ccca4264815e91f30be12.zip
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,
const struct regmap_config *config);
void regmap_exit(struct regmap *map);
+int regmap_reinit_cache(struct regmap *map,
+ const struct regmap_config *config);
int regmap_write(struct regmap *map, unsigned int reg, unsigned int val);
int regmap_raw_write(struct regmap *map, unsigned int reg,
const void *val, size_t val_len);