Skip to content

Commit

Permalink
regulator: rtmv20: Fix to make regcache value first reading back from HW
Browse files Browse the repository at this point in the history
[ Upstream commit 46639a5 ]

- Fix to make regcache value first reading back from HW.

Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
Link: https://lore.kernel.org/r/1622542155-6373-1-git-send-email-u0084500@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
ChiYuan Huang authored and gregkh committed Jun 23, 2021
1 parent fccd7c3 commit 6e47a81
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/regulator/rtmv20-regulator.c
Expand Up @@ -27,6 +27,7 @@
#define RTMV20_REG_LDIRQ 0x30
#define RTMV20_REG_LDSTAT 0x40
#define RTMV20_REG_LDMASK 0x50
#define RTMV20_MAX_REGS (RTMV20_REG_LDMASK + 1)

#define RTMV20_VID_MASK GENMASK(7, 4)
#define RICHTEK_VID 0x80
Expand Down Expand Up @@ -313,6 +314,7 @@ static const struct regmap_config rtmv20_regmap_config = {
.val_bits = 8,
.cache_type = REGCACHE_RBTREE,
.max_register = RTMV20_REG_LDMASK,
.num_reg_defaults_raw = RTMV20_MAX_REGS,

.writeable_reg = rtmv20_is_accessible_reg,
.readable_reg = rtmv20_is_accessible_reg,
Expand Down

0 comments on commit 6e47a81

Please sign in to comment.