summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-12-03 17:06:20 +0000
committerLokesh Pathak <lpathak@nvidia.com>2012-03-05 07:55:47 -0800
commitfd572265f6e4d795bff9e059fe6fdbf007f1e705 (patch)
treee55dd82a9b98f5e12b9aeb7031412f9eb90973af /include/linux
parent65a11acf350177394a96e21919c6fef2551a2cc3 (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> (cherry picked from commit bf315173359b2f3b8b8ccca4264815e91f30be12) Change-Id: I896f9a1f116d1fa43225c1ab63dbf0459e5a6b83 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/87573
Diffstat (limited to 'include/linux')
-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 24560c7d1147..0daf7ea53a62 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -128,6 +128,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);