]> asedeno.scripts.mit.edu Git - linux.git/commit
mfd: axp20x: Add a 500ms delay at the end of axp20x_power_off
authorHans de Goede <hdegoede@redhat.com>
Sun, 5 Jun 2016 13:50:48 +0000 (15:50 +0200)
committerLee Jones <lee.jones@linaro.org>
Wed, 29 Jun 2016 09:14:32 +0000 (10:14 +0100)
commit179dc63d06c51a78483dedbdf34540af053a6269
tree0637035191674fbfc2600e4c85a7ca1eb72af8a1
parent2be59755e66d34f46001ca19224ab4cefb212c51
mfd: axp20x: Add a 500ms delay at the end of axp20x_power_off

The kernel expects the power_off function to not return, and if it does
it panics. Add a slight delay after the i2c write which turns off power
through the PMIC, to give capacitors etc. some time to drain.

Without this the kernel lives on long enough after the poweroff to
print the following on the serial console on my Mele A1000G quad:

[  248.583588] reboot: Power down
[  248.600490] Kernel pa

With the delay the start of printing "Kernel panic" is gone.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/axp20x.c