diff options
author | Chen-Yu Tsai <wens@csie.org> | 2016-05-02 10:28:14 +0800 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2016-05-25 17:52:39 +0200 |
commit | 511992695de9309b53a291caa5ff9bce62d44ae4 (patch) | |
tree | 2d5fc05579d0563fdce79a1756878492a6982ffd /drivers | |
parent | 9850e201481dcc13db7b144c609db4480bd47543 (diff) | |
download | u-boot-511992695de9309b53a291caa5ff9bce62d44ae4.tar.gz |
sunxi: Implement poweroff support for axp818 pmic
Adds poweroff support for axp818 pmic.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/power/Kconfig | 1 | ||||
-rw-r--r-- | drivers/power/axp818.c | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig index 02cb8e7ba6..d1375369c1 100644 --- a/drivers/power/Kconfig +++ b/drivers/power/Kconfig @@ -44,6 +44,7 @@ config AXP221_POWER config AXP818_POWER boolean "axp818 pmic support" depends on MACH_SUN8I_A83T + select CMD_POWEROFF ---help--- Say y here to enable support for the axp818 pmic found on A83T dev board. diff --git a/drivers/power/axp818.c b/drivers/power/axp818.c index bf6ecd6be5..af4d7a6903 100644 --- a/drivers/power/axp818.c +++ b/drivers/power/axp818.c @@ -255,3 +255,14 @@ int axp_init(void) return 0; } + +int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +{ + pmic_bus_write(AXP818_SHUTDOWN, AXP818_SHUTDOWN_POWEROFF); + + /* infinite loop during shutdown */ + while (1) {} + + /* not reached */ + return 0; +} |