regmap: Allow drivers to sync only part of the register cache
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 23 Feb 2012 20:53:37 +0000 (20:53 +0000)
committerSimone Willett <swillett@nvidia.com>
Sun, 15 Apr 2012 20:50:26 +0000 (13:50 -0700)
commitfe5d7a370e86d9a3ba10e94f834bd3d2619d0f73
treecdaae96ffa1ab537b0cfec61aa44c9c287e51b4a
parent9d586b202c93d646167b235864e0cd21b2b2c87c
regmap: Allow drivers to sync only part of the register cache

Provide a regcache_sync_region() operation which allows drivers to
write only part of the cache back to the hardware. This is intended
for use in cases like power domains or DSP memories where part of the
device register map may be reset without fully resetting the device.

Fully supporting these devices is likely to require additional work to
make specific regions of the register map cache only while they are in
reset, but this is enough for most devices.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
(cherry picked from commit 4d4cfd1656b5f6c88eae51c40741a695b108b006)

Change-Id: Ia8cccf7986611485ae090e234bb68084671d7641
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/96490
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
drivers/base/regmap/regcache.c
include/linux/regmap.h