diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-01-21 12:01:14 +0000 |
---|---|---|
committer | Lokesh Pathak <lpathak@nvidia.com> | 2012-03-05 07:57:23 -0800 |
commit | f18eef2d3decfecb68e012414015e5f9fa8ba904 (patch) | |
tree | 877ac32a50ee6686d85ba32fc4d91fb57479e3f3 /include | |
parent | 4f94307fea52790af53c8dcdded22683aa42ed96 (diff) |
regmap: Support register patch sets
Device manufacturers frequently provide register sequences, usually not
fully documented, to be run at startup in order to provide better defaults
for devices (for example, improving performance in the light of silicon
evaluation). Support such updates by allowing drivers to register update
sets with the core. These updates will be written to the device immediately
and will also be rewritten when the cache is synced.
The assumption is that the reason for resyncing the cache will always be
that the device has been powered off. If this turns out to not be the case
then a separate operation can be provided.
Currently the implementation only allows a single set of updates to be
specified for a device, this could be extended in future.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
(cherry picked from commit 22f0d90a34827812413bb3fbeda6a2a79bb58423)
Change-Id: I02f4ead9866a90b3635c4b98f1f9c3be3109c5ea
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/87577
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/regmap.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h index 9679f357f6b6..054a27db825a 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h @@ -153,6 +153,9 @@ void regcache_cache_only(struct regmap *map, bool enable); void regcache_cache_bypass(struct regmap *map, bool enable); void regcache_mark_dirty(struct regmap *map); +int regmap_register_patch(struct regmap *map, const struct reg_default *regs, + int num_regs); + /** * Description of an IRQ for the generic regmap irq_chip. * |