From: Andreas Kemnade <andreas@kemnade.info>
To: lee.jones@linaro.org, linux-kernel@vger.kernel.org, phh@phh.me,
stefan@agner.ch, b.galvani@gmail.com
Cc: Andreas Kemnade <andreas@kemnade.info>
Subject: [PATCH] mfd: rn5t618: Fix caching of battery related registers
Date: Fri, 17 Jul 2020 23:00:02 +0200 [thread overview]
Message-ID: <20200717210002.27366-1-andreas@kemnade.info> (raw)
Battery status changes dynamically, so the corresponding registers
need to be considered volatile. Affected registers are:
- fuel gauge
- battery status
- battery interrupt
Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
---
drivers/mfd/rn5t618.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/mfd/rn5t618.c b/drivers/mfd/rn5t618.c
index 232de50562f9..55c47e555dd8 100644
--- a/drivers/mfd/rn5t618.c
+++ b/drivers/mfd/rn5t618.c
@@ -44,6 +44,9 @@ static bool rn5t618_volatile_reg(struct device *dev, unsigned int reg)
case RN5T618_INTMON:
case RN5T618_RTC_CTRL1 ... RN5T618_RTC_CTRL2:
case RN5T618_RTC_SECONDS ... RN5T618_RTC_YEAR:
+ case RN5T618_CHGSTATE:
+ case RN5T618_CHGCTRL_IRR ... RN5T618_CHGERR_MONI:
+ case RN5T618_CONTROL ... RN5T618_CC_AVEREG0:
return true;
default:
return false;
--
2.20.1
next reply other threads:[~2020-07-17 21:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-17 21:00 Andreas Kemnade [this message]
2020-07-22 9:56 ` [PATCH] mfd: rn5t618: Fix caching of battery related registers Lee Jones
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=20200717210002.27366-1-andreas@kemnade.info \
--to=andreas@kemnade.info \
--cc=b.galvani@gmail.com \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=phh@phh.me \
--cc=stefan@agner.ch \
/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;
as well as URLs for NNTP newsgroup(s).