diff options
| author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-12-03 12:06:20 -0500 |
|---|---|---|
| committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-12-05 08:17:36 -0500 |
| commit | bf315173359b2f3b8b8ccca4264815e91f30be12 (patch) | |
| tree | eb922a86d595849df02c474e034c855d770abce0 /include/linux | |
| parent | 50b776fc71c13663eb7434f634f2b796de5c9885 (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')
| -rw-r--r-- | include/linux/regmap.h | 2 |
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 | ||
| 131 | void regmap_exit(struct regmap *map); | 131 | void regmap_exit(struct regmap *map); |
| 132 | int regmap_reinit_cache(struct regmap *map, | ||
| 133 | const struct regmap_config *config); | ||
| 132 | int regmap_write(struct regmap *map, unsigned int reg, unsigned int val); | 134 | int regmap_write(struct regmap *map, unsigned int reg, unsigned int val); |
| 133 | int regmap_raw_write(struct regmap *map, unsigned int reg, | 135 | int 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); |
