diff options
author | Samuel Holland <samuel@sholland.org> | 2020-01-04 19:24:08 -0600 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-02-11 04:34:01 -0800 |
commit | f3f9cfca057af9635c23c31b38c1c3e6a34a5319 (patch) | |
tree | a9cd15816b55593d9cbf740191402a1eb4e45ce0 /drivers/mfd/axp20x.c | |
parent | e6c92036c2fe8424dce1ab6c388ba1cc29c29e66 (diff) | |
download | linux-stable-f3f9cfca057af9635c23c31b38c1c3e6a34a5319.tar.gz linux-stable-f3f9cfca057af9635c23c31b38c1c3e6a34a5319.tar.bz2 linux-stable-f3f9cfca057af9635c23c31b38c1c3e6a34a5319.zip |
mfd: axp20x: Mark AXP20X_VBUS_IPSOUT_MGMT as volatile
commit dc91c3b6fe66a13ac76f6cb3b2100c0779cd3350 upstream.
On AXP288 and newer PMICs, bit 7 of AXP20X_VBUS_IPSOUT_MGMT can be set
to prevent using the VBUS input. However, when the VBUS unplugged and
plugged back in, the bit automatically resets to zero.
We need to set the register as volatile to prevent regmap from caching
that bit. Otherwise, regcache will think the bit is already set and not
write the register.
Fixes: cd53216625a0 ("mfd: axp20x: Fix axp288 volatile ranges")
Cc: stable@vger.kernel.org
Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/mfd/axp20x.c')
-rw-r--r-- | drivers/mfd/axp20x.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c index f8e0fa97bb31..aa65931142ba 100644 --- a/drivers/mfd/axp20x.c +++ b/drivers/mfd/axp20x.c @@ -128,7 +128,7 @@ static const struct regmap_range axp288_writeable_ranges[] = { static const struct regmap_range axp288_volatile_ranges[] = { regmap_reg_range(AXP20X_PWR_INPUT_STATUS, AXP288_POWER_REASON), regmap_reg_range(AXP288_BC_GLOBAL, AXP288_BC_GLOBAL), - regmap_reg_range(AXP288_BC_DET_STAT, AXP288_BC_DET_STAT), + regmap_reg_range(AXP288_BC_DET_STAT, AXP20X_VBUS_IPSOUT_MGMT), regmap_reg_range(AXP20X_CHRG_BAK_CTRL, AXP20X_CHRG_BAK_CTRL), regmap_reg_range(AXP20X_IRQ1_EN, AXP20X_IPSOUT_V_HIGH_L), regmap_reg_range(AXP20X_TIMER_CTRL, AXP20X_TIMER_CTRL), |