]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
sniper: Power off when the power on reason is not a valid one
authorPaul Kocialkowski <contact@paulk.fr>
Mon, 20 Jul 2015 13:17:17 +0000 (15:17 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 10 Sep 2015 06:24:14 +0000 (08:24 +0200)
commit87a8d3a778d89b08be327fe3150712586bdb3e71
tree5f8a51643a4da197cdf18ee09c5428dfed23caff
parent5faa1c061b0222c91de6ca605619545a0e894e69
sniper: Power off when the power on reason is not a valid one

In most cases, userspace will attempt to power off the device with HALT instead
of POWER_OFF, which triggers a reset instead of a proper power off from the
TWL4030. Hence, it is up to the bootloader to actually turn the device off when
there is no reason to turn it on.

A reboot identified with the OMAP reboot mode bits set is acceptable, as well as
a power on reason from either the power button, USB or charger plug.

Other cases should trigger a power off. Note that for the U-Boot reset command
to take effect, we have to fill-in the OMAP reboot bits.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Tom Rini <trini@konsulko.com>
board/lge/sniper/sniper.c