mfd: rn5t618: Fix caching of battery related registers
authorAndreas Kemnade <andreas@kemnade.info>
Fri, 17 Jul 2020 21:00:02 +0000 (23:00 +0200)
committerLee Jones <lee.jones@linaro.org>
Thu, 13 Aug 2020 06:50:02 +0000 (07:50 +0100)
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>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/rn5t618.c

index 7497edf..e25407e 100644 (file)
@@ -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;