]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mfd: axp20x: Mark AXP20X_VBUS_IPSOUT_MGMT as volatile
authorSamuel Holland <samuel@sholland.org>
Sun, 5 Jan 2020 01:24:08 +0000 (19:24 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Feb 2020 12:35:21 +0000 (04:35 -0800)
commit6bdd1a0ed11141e4a3574b28200f45e65343f0e6
tree9770dd66bbbe4bd9dcff5fce1c743f4659027c5a
parent385c61a41cf9abc504f8ecbe8c41ced850c1e9c1
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>
drivers/mfd/axp20x.c