]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 13 Mar 2020 05:19:20 +0000 (01:19 -0400)
commitfc5e535d229d968d0c04a552d033c31f7ebcf555
tree74d3e1ce9f2f9b3c3f2f9e2de8b9d3651fec2695
parentc7f18d7f6022416769097fbc6a49f2a00671634c
mfd: axp20x: Mark AXP20X_VBUS_IPSOUT_MGMT as volatile

BugLink: https://bugs.launchpad.net/bugs/1867051
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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/mfd/axp20x.c