Skip to content

Commit 46639a5

Browse files
ChiYuan Huangbroonie
authored andcommitted
regulator: rtmv20: Fix to make regcache value first reading back from HW
- 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>
1 parent 8908217 commit 46639a5

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎drivers/regulator/rtmv20-regulator.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#define RTMV20_REG_LDIRQ 0x30
2828
#define RTMV20_REG_LDSTAT 0x40
2929
#define RTMV20_REG_LDMASK 0x50
30+
#define RTMV20_MAX_REGS (RTMV20_REG_LDMASK + 1)
3031

3132
#define RTMV20_VID_MASK GENMASK(7, 4)
3233
#define RICHTEK_VID 0x80
@@ -313,6 +314,7 @@ static const struct regmap_config rtmv20_regmap_config = {
313314
.val_bits = 8,
314315
.cache_type = REGCACHE_RBTREE,
315316
.max_register = RTMV20_REG_LDMASK,
317+
.num_reg_defaults_raw = RTMV20_MAX_REGS,
316318

317319
.writeable_reg = rtmv20_is_accessible_reg,
318320
.readable_reg = rtmv20_is_accessible_reg,

0 commit comments

Comments
 (0)