diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-10-26 10:34:22 +0200 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-11-08 11:38:15 +0000 |
commit | 8ae0d7e8a918e9603748abe9b31984fc5d96abb3 (patch) | |
tree | 329564b9bdc3cac89a3ac1586c9e5812ab21bf1c /drivers/base/regmap/internal.h | |
parent | 1ea6b8f48918282bdca0b32a34095504ee65bab5 (diff) | |
download | linux-3.10-8ae0d7e8a918e9603748abe9b31984fc5d96abb3.tar.gz linux-3.10-8ae0d7e8a918e9603748abe9b31984fc5d96abb3.tar.bz2 linux-3.10-8ae0d7e8a918e9603748abe9b31984fc5d96abb3.zip |
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>
Diffstat (limited to 'drivers/base/regmap/internal.h')
-rw-r--r-- | drivers/base/regmap/internal.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/base/regmap/internal.h b/drivers/base/regmap/internal.h index 348ff02eb93..6483e0bda0c 100644 --- a/drivers/base/regmap/internal.h +++ b/drivers/base/regmap/internal.h @@ -74,6 +74,7 @@ struct regmap { struct reg_default *reg_defaults; const void *reg_defaults_raw; void *cache; + bool cache_dirty; }; struct regcache_ops { |