OSDN Git Service

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:34:01 +0000 (04:34 -0800)
commitf3f9cfca057af9635c23c31b38c1c3e6a34a5319
treea9cd15816b55593d9cbf740191402a1eb4e45ce0
parente6c92036c2fe8424dce1ab6c388ba1cc29c29e66
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