OSDN Git Service

mfd: palmas: Reset the POWERHOLD mux during power off
authorKeerthy <j-keerthy@ti.com>
Thu, 10 Nov 2016 05:09:18 +0000 (10:39 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 24 Mar 2018 10:00:16 +0000 (11:00 +0100)
commit6ed083b35d291e06b1792fd4ff3fb45b5ab6e5c5
tree83487477f7a2d0c940b58674153660ed62afaaf0
parent3ba6aff7f6539d6923646eed031fcd032dc624f9
mfd: palmas: Reset the POWERHOLD mux during power off

[ Upstream commit 85fdaf8eb9bbec1f0f8a52fd5d85659d60738816 ]

POWERHOLD signal has higher priority  over the DEV_ON bit.
So power off will not happen if the POWERHOLD is held high.
Hence reset the MUX to GPIO_7 mode to release the POWERHOLD
and the DEV_ON bit to take effect to power off the PMIC.

PMIC Power off happens in dire situations like thermal shutdown
so irrespective of the POWERHOLD setting go ahead and turn off
the powerhold.  Currently poweroff is broken on boards that have
powerhold enabled. This fixes poweroff on those boards.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mfd/palmas.c