diff options
author | Oleksandr Suvorov <oleksandr.suvorov@toradex.com> | 2020-10-27 19:08:54 +0200 |
---|---|---|
committer | Oleksandr Suvorov <oleksandr.suvorov@toradex.com> | 2021-01-28 14:48:12 +0200 |
commit | aebbdbb42fbec323d242a6c0fb5fe6c97636ee3e (patch) | |
tree | 04d773072236a0f5b3fc2ec313b62bc56d44ddb3 /arch/arm/mach-imx | |
parent | 5e6743b564dc4d380f5360e0c92cf0debf05d507 (diff) |
ARM: imx6: fix setting up pm_power_off callback
It is not necessarily that the system with set up the
POWER_RESET_GPIO config option has the enabled device "gpio-poweroff".
Without this device the "pm_power_off" callback remains uninitialized
and the syscall "reboot" converts the signal LINUX_REBOOT_CMD_POWER_OFF
into LINUX_REBOOT_CMD_HALT.
This leads to skip calling the callback "pm_power_off_prepare" that
should do an important work for iMX6+PF0100 systems: it should turns
down all power rails of PMIC PF0100 to emulate a "power off" state as a
workaround for a PMIC PF0100 with PMIC_ON_REQ and VCC_BATT is supplied
from a battery, leading to unable to restart the module either by RESET
or power cycle.
Note, that gpio-poweroff device still can grab the pm_power_off callback
using the property "force-mode" introduced in the commit:
964f69e00a4d ("power: reset: gpio-poweroff: add force-mode")
Enable setting pm_power_off callback on the system with POWER_RESET_GPIO
config option.
Related-to: ELB-3008
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r-- | arch/arm/mach-imx/pm-imx6.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/arch/arm/mach-imx/pm-imx6.c b/arch/arm/mach-imx/pm-imx6.c index 3374aae55efd..873d27d90637 100644 --- a/arch/arm/mach-imx/pm-imx6.c +++ b/arch/arm/mach-imx/pm-imx6.c @@ -1313,7 +1313,6 @@ void __init imx6q_pm_init(void) imx6_pm_common_init(&imx6q_lpddr2_pm_data); else imx6_pm_common_init(&imx6q_pm_data); -#ifndef CONFIG_POWER_RESET_GPIO /* * if no specific power off function in board file, power off system by * stop mode @@ -1321,14 +1320,12 @@ void __init imx6q_pm_init(void) if (!pm_power_off) if (of_machine_is_compatible("toradex,apalis_imx6q")) pm_power_off = imx6_stop_mode_poweroff; -#endif } void __init imx6dl_pm_init(void) { imx6_pm_common_init(&imx6dl_pm_data); -#ifndef CONFIG_POWER_RESET_GPIO /* * if no specific power off function in board file, power off system by * stop mode @@ -1336,7 +1333,6 @@ void __init imx6dl_pm_init(void) if (!pm_power_off) if (of_machine_is_compatible("toradex,colibri_imx6dl")) pm_power_off = imx6_stop_mode_poweroff; -#endif } void __init imx6sl_pm_init(void) |