regmap: Track if the register cache is dirty and suppress unneeded syncs
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 26 Oct 2011 08:34:22 +0000 (10:34 +0200)
committerLokesh Pathak <lpathak@nvidia.com>
Mon, 5 Mar 2012 15:48:03 +0000 (07:48 -0800)
commit5b231be1b3bfdffa300f68c0d2fbd72df1b7f653
treeb93582ee2b20589c3d4ec30abae0278cc0b413f0
parentca83428e42838440aa62f9201a53f62afc8f540b
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>
(cherry picked from commit 8ae0d7e8a918e9603748abe9b31984fc5d96abb3)

Change-Id: If3380b73669ebaaf474cf46fdd2f4339345c66a3
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/87549
drivers/base/regmap/internal.h
drivers/base/regmap/regcache.c
drivers/base/regmap/regmap.c
include/linux/regmap.h