linux/drivers/base/regmap
Kevin Cernekee 1c79771a72 regmap: Use regcache_mark_dirty() to indicate power loss or reset
Existing regmap users call regcache_mark_dirty() as part of the
suspend/resume sequence, to tell regcache that non-default values need to
be resynced post-resume.  Add an internal "no_sync_defaults" regmap flag
to remember this state, so that regcache_sync() can differentiate between
these two cases:

1) HW was reset, so any cache values that match map->reg_defaults can be
safely skipped.  On some chips there are a lot of registers in the
reg_defaults list, so this optimization speeds things up quite a bit.

2) HW was not reset (maybe it was just clock-gated), so if we cached
any writes, they should be sent to the hardware regardless of whether
they match the HW default.  Currently this will write out all values in
the regcache, since we don't maintain per-register dirty bits.

Suggested-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Kevin Cernekee <cernekee@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-06 13:01:25 +01:00
..
internal.h regmap: Use regcache_mark_dirty() to indicate power loss or reset 2015-05-06 13:01:25 +01:00
Kconfig regmap: ac97: Add generic AC'97 callbacks 2014-11-19 10:28:14 +00:00
Makefile regmap: Move tracing header into drivers/base/regmap 2015-03-19 22:22:45 +00:00
regcache-flat.c regmap: cache: Sort include headers alphabetically 2014-10-20 12:25:06 +01:00
regcache-lzo.c regmap: cache: Sort include headers alphabetically 2014-10-20 12:25:06 +01:00
regcache-rbtree.c regmap: regcache-rbtree: Fix present bitmap resize 2015-03-07 16:17:33 +00:00
regcache.c regmap: Use regcache_mark_dirty() to indicate power loss or reset 2015-05-06 13:01:25 +01:00
regmap-ac97.c regmap: ac97: Clean up indentation 2015-02-02 12:13:39 +00:00
regmap-debugfs.c Merge remote-tracking branch 'regmap/fix/debugfs' into regmap-linus 2014-09-29 20:49:40 +01:00
regmap-i2c.c regmap: Fix i2c word access when using SMBus access functions 2015-02-04 20:48:13 +00:00
regmap-irq.c regmap-irq: set IRQF_ONESHOT flag to ensure IRQ request 2015-02-14 14:26:36 +09:00
regmap-mmio.c Merge remote-tracking branches 'regmap/topic/irq', 'regmap/topic/le', 'regmap/topic/mmio' and 'regmap/topic/rbtree' into regmap-next 2014-06-02 17:07:39 +01:00
regmap-spi.c regmap: add DT endianness binding support. 2014-08-16 16:56:23 -05:00
regmap-spmi.c regmap: spmi: support base and extended register spaces 2014-02-15 11:55:28 -08:00
regmap.c regmap: Move tracing header into drivers/base/regmap 2015-03-19 22:22:45 +00:00
trace.h regmap: Move tracing header into drivers/base/regmap 2015-03-19 22:22:45 +00:00