]> git.baikalelectronics.ru Git - kernel.git/commit
mfd: twl4030-power: Fix poweroff with PM configuration enabled
authorTony Lindgren <tony@atomide.com>
Sun, 2 Nov 2014 18:07:56 +0000 (10:07 -0800)
committerLee Jones <lee.jones@linaro.org>
Mon, 10 Nov 2014 15:22:04 +0000 (15:22 +0000)
commit3ee671788d6510060d9785e5826d8a6274bc9aa1
treefec379479db753f58dacf53a59f29ec355e8a292
parent8340eea3ffac4eedead2f10412ab9fc37c108244
mfd: twl4030-power: Fix poweroff with PM configuration enabled

Commit 3e774d6abc30 ("mfd: twl4030-power: Add generic reset
configuration") enabled configuring the PM features for twl4030.

This caused poweroff command to fail on devices that have the
BCI charger on twl4030 wired, or have power wired for VBUS.
Instead of powering off, the device reboots. This is because
voltage is detected on charger or VBUS with the default bits
enabled for the power transition registers.

To fix the issue, let's just clear VBUS and CHG bits as we want
poweroff command to keep the system powered off.

Fixes: 3e774d6abc30 ("mfd: twl4030-power: Add generic reset configuration")
Cc: stable@vger.kernel.org # v3.16+
Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/twl4030-power.c