mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-02-22 20:24:27 +01:00
power: twl4030: Add CONFIG_CMD_POWEROFF support
With the addition of twl4030_power_off(), let's allow the 'poweroff' command to run this function when CONFIG_CMD_POWEROFF is enabled. Tested on a DM3730 with twl4030 PMIC. Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
This commit is contained in:
parent
15fde737fc
commit
4c2fb5fcc8
1 changed files with 9 additions and 0 deletions
|
|
@ -171,3 +171,12 @@ void twl4030_power_mmc_init(int dev_index)
|
|||
mdelay(100); /* ramp-up delay from Linux code */
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CMD_POWEROFF
|
||||
int do_poweroff(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
||||
{
|
||||
twl4030_power_off();
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue