diff options
author | Oleksandr Suvorov <oleksandr.suvorov@toradex.com> | 2020-10-27 19:08:54 +0200 |
---|---|---|
committer | Oleksandr Suvorov <oleksandr.suvorov@toradex.com> | 2021-03-19 17:00:34 +0200 |
commit | 6d0b9b7e8aab837a405a37645e103b21201dc5e4 (patch) | |
tree | 30b04d508c2f66b9fe5fede7a675264272bafd62 /arch/arm | |
parent | 64f3c21d5edd1953c10e77401b7421360225ae88 (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-3580
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
(cherry-picked from aebbdbb42fbec323d242a6c0fb5fe6c97636ee3e)
Diffstat (limited to 'arch/arm')
-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 8fd1f7188725..42594e7046b7 100644 --- a/arch/arm/mach-imx/pm-imx6.c +++ b/arch/arm/mach-imx/pm-imx6.c @@ -1353,7 +1353,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 @@ -1361,14 +1360,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 @@ -1376,7 +1373,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) |