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)
committerLee Jones <lee.jones@linaro.org>
Thu, 27 Apr 2017 08:25:05 +0000 (09:25 +0100)
commit85fdaf8eb9bbec1f0f8a52fd5d85659d60738816
tree00ee0e688860e897dafb67c2aaf9d4b2c7f0dc2f
parentf5139c27e734bf8458c0afc60ef86e45517e1126
mfd: palmas: Reset the POWERHOLD mux during power off

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>
drivers/mfd/palmas.c