regmap: Track if the register cache is dirty and suppress unneeded syncs
Allow drivers to optimise out the register cache sync if they didn't need to do one. If the hardware is desynced from the register cache (by power loss for example) then the driver should call regcache_mark_dirty() to let the core know about this. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
1ea6b8f489
commit
8ae0d7e8a9
4 changed files with 24 additions and 1 deletions
|
@ -143,5 +143,6 @@ int regmap_update_bits(struct regmap *map, unsigned int reg,
|
|||
int regcache_sync(struct regmap *map);
|
||||
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);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue