]> git.baikalelectronics.ru Git - kernel.git/commit
regmap: drop cache if the bus transfer error
authorElaine Zhang <zhangqing@rock-chips.com>
Thu, 18 Aug 2016 09:01:55 +0000 (17:01 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 18 Aug 2016 10:09:12 +0000 (11:09 +0100)
commit5f255a38d95aec3b8821a2f05d6b9deebd9e7046
tree159196282922d63c2c2a5dc52f7f6053060fb0f2
parentf45b0bf2f5aab53b479d2c1a1ab678173f52da8c
regmap: drop cache if the bus transfer error

regmap_write
->_regmap_raw_write
-->regcache_write first and than use map->bus->write to wirte i2c or spi
But if the i2c or spi transfer failed, But the cache is updated, So if I use
regmap_read will get the cache data which is not the real register value.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/regmap.c