From: cy_huang <u0084500@gmail.com>
To: lgirdwood@gmail.com, broonie@kernel.org
Cc: linux-kernel@vger.kernel.org, cy_huang@richtek.com
Subject: [PATCH] regulator: rtmv20: Fix to make regcache value first reading back from HW
Date: Tue, 1 Jun 2021 18:09:15 +0800 [thread overview]
Message-ID: <1622542155-6373-1-git-send-email-u0084500@gmail.com> (raw)
From: ChiYuan Huang <cy_huang@richtek.com>
- Fix to make regcache value first reading back from HW.
Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
---
Due to init property function always write the regval, this patch didn't affect the normal
operation. Just used to make sure during the cache init, the regcache default is reading back
from the HW.
---
drivers/regulator/rtmv20-regulator.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/regulator/rtmv20-regulator.c b/drivers/regulator/rtmv20-regulator.c
index 852fb25..b37c29c 100644
--- a/drivers/regulator/rtmv20-regulator.c
+++ b/drivers/regulator/rtmv20-regulator.c
@@ -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
@@ -275,6 +276,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,
--
2.7.4
next reply other threads:[~2021-06-01 10:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-01 10:09 cy_huang [this message]
2021-06-01 17:38 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1622542155-6373-1-git-send-email-u0084500@gmail.com \
--to=u0084500@gmail.com \
--cc=broonie@kernel.org \
--cc=cy_huang@richtek.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®