[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200717210002.27366-1-andreas@kemnade.info>
Date: Fri, 17 Jul 2020 23:00:02 +0200
From: Andreas Kemnade <andreas@...nade.info>
To: lee.jones@...aro.org, linux-kernel@...r.kernel.org, phh@....me,
stefan@...er.ch, b.galvani@...il.com
Cc: Andreas Kemnade <andreas@...nade.info>
Subject: [PATCH] mfd: rn5t618: Fix caching of battery related registers
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@...nade.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
Powered by blists - more mailing lists