mfd: twl4030-power: Fix hang on reboot if sleep configuration was loaded earlier
authorTony Lindgren <tony@atomide.com>
Wed, 14 May 2014 01:34:04 +0000 (18:34 -0700)
committerLee Jones <lee.jones@linaro.org>
Wed, 28 May 2014 07:04:58 +0000 (08:04 +0100)
commitfc7d76e4c0dc8746f56dcd0a7d9b62ce5e759c04
tree728f0d06c2186537dbb0fa5e11261cd5ec2e547d
parenta613b739b8c08eab811e677810045cc0522fc3e6
mfd: twl4030-power: Fix hang on reboot if sleep configuration was loaded earlier

Looks like we can still hit the issue of wrong load order of
twl4030 configuration. If we have a sleep configuration loaded,
and do a warm reset, the device can hang while initializing the
wakeup12 sequence. We do have a warning message about wrong order
of twl4030 configuration, but in this case it does not help as
the sleep configuration was loaded during the previous boot and
the state of twl4030 is maintained throughout the warm reset.

Fix the issue by clearing any existing sleep configuration
before we load the warm reset configuration.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/twl4030-power.c