[PATCH] regulator: rtmv20: Add missing regcache cache only before marked as dirty
From: cy_huang
Date: Wed Sep 30 2020 - 06:19:03 EST
From: ChiYuan Huang <cy_huang@xxxxxxxxxxx>
Add missing regcache cache only before masked as dirty.
Signed-off-by: ChiYuan Huang <cy_huang@xxxxxxxxxxx>
---
drivers/regulator/rtmv20-regulator.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/regulator/rtmv20-regulator.c b/drivers/regulator/rtmv20-regulator.c
index 1075b10..0a07598 100644
--- a/drivers/regulator/rtmv20-regulator.c
+++ b/drivers/regulator/rtmv20-regulator.c
@@ -321,6 +321,7 @@ static int rtmv20_probe(struct i2c_client *i2c)
* keep in shutdown mode to minimize the current consumption
* and also mark regcache as dirty
*/
+ regcache_cache_only(priv->regmap, true);
regcache_mark_dirty(priv->regmap);
gpiod_set_value(priv->enable_gpio, 0);
--
2.7.4