diff options
author | Koro Chen <koro.chen@mediatek.com> | 2016-03-16 14:44:18 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-03-16 06:43:24 -0700 |
commit | 74d2e46ea3d3a1c52cfd3802454c016e5812d7e7 (patch) | |
tree | 224be02e8697eb12031752e03221227df9209765 /power | |
parent | c1fbaa22c62c621e414dd0b58e90ad972b4ddb44 (diff) | |
download | chrome-ec-74d2e46ea3d3a1c52cfd3802454c016e5812d7e7.tar.gz |
oak: Clean up CONFIG_PMIC_FW_LONG_PRESS_TIMER related codes
CONFIG_PMIC_FW_LONG_PRESS_TIMER was ported long time ago from
Tegra, but the codes are actually not used and erroneous.
It might wrongly trigger set_pmic_pwron(0), and turn off
PMIC power accidentally. This causes POWER_GOOD lost and
power state will go back to S5 during boot up.
Clean up the codes by referencing check_for_power_off_event()
of Rockchip.
BRANCH=none
BUG=none
TEST=bootup and press power button quickly right after we are in S0.
Bootup should still complete normally.
Change-Id: Ie034efa3575dbebae4debb1afc206fddd9116350
Signed-off-by: Koro Chen <koro.chen@mediatek.com>
Reviewed-on: https://chromium-review.googlesource.com/332724
Reviewed-by: Rong Chang <rongchang@chromium.org>
Diffstat (limited to 'power')
-rw-r--r-- | power/mediatek.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/power/mediatek.c b/power/mediatek.c index bdd330de7c..97144b0e8e 100644 --- a/power/mediatek.c +++ b/power/mediatek.c @@ -325,23 +325,12 @@ static int check_for_power_off_event(void) now = get_time(); if (pressed) { -#ifndef CONFIG_PMIC_FW_LONG_PRESS_TIMER - /* - * Only assert PMIC_PWRON if PMIC supports long-press - * power off. - */ - CPRINTS("PMIC long-press power off\n"); - set_pmic_pwron(1); -#endif - if (!power_button_was_pressed) { power_off_deadline.val = now.val + DELAY_FORCE_SHUTDOWN; CPRINTS("power waiting for long press %u", power_off_deadline.le.lo); -#ifdef CONFIG_PMIC_FW_LONG_PRESS_TIMER /* Ensure we will wake up to check the power key */ timer_arm(power_off_deadline, TASK_ID_CHIPSET); -#endif } else if (timestamp_expired(power_off_deadline, &now)) { power_off_deadline.val = 0; CPRINTS("power off after long press now=%u, %u", @@ -350,10 +339,7 @@ static int check_for_power_off_event(void) } } else if (power_button_was_pressed) { CPRINTS("power off cancel"); - set_pmic_pwron(0); -#ifdef CONFIG_PMIC_FW_LONG_PRESS_TIMER timer_cancel(TASK_ID_CHIPSET); -#endif } power_button_was_pressed = pressed; |