diff options
-rw-r--r-- | common/pmu_tps65090.c | 9 | ||||
-rw-r--r-- | common/pmu_tps65090_charger.c | 8 |
2 files changed, 8 insertions, 9 deletions
diff --git a/common/pmu_tps65090.c b/common/pmu_tps65090.c index b1d0b2fbe0..c7a34426a0 100644 --- a/common/pmu_tps65090.c +++ b/common/pmu_tps65090.c @@ -600,15 +600,6 @@ void pmu_init(void) if (!failure) failure = pmu_clear_irq(); - /* Enable charger interrupt. */ - if (!failure) - failure = gpio_enable_interrupt(GPIO_CHARGER_INT); - -#ifdef CONFIG_AC_POWER_STATUS - if (!failure) - failure = gpio_set_flags(GPIO_AC_STATUS, GPIO_OUT_HIGH); -#endif - /* Exit the retry loop if there was no failure */ if (!failure) break; diff --git a/common/pmu_tps65090_charger.c b/common/pmu_tps65090_charger.c index 1b2a9aa37a..0377e5fc9f 100644 --- a/common/pmu_tps65090_charger.c +++ b/common/pmu_tps65090_charger.c @@ -393,6 +393,14 @@ void charger_task(void) timestamp_t pre_chg_start = get_time(); pmu_init(); + + /* Enable charger interrupt */ + gpio_enable_interrupt(GPIO_CHARGER_INT); + +#ifdef CONFIG_AC_POWER_STATUS + gpio_set_flags(GPIO_AC_STATUS, GPIO_OUT_HIGH); +#endif + /* * EC STOP mode support * The charging loop can be stopped in idle state with AC unplugged. |