diff options
author | Randall Spangler <rspangler@chromium.org> | 2013-04-26 11:14:55 -0700 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-04-26 13:46:47 -0700 |
commit | fd38ba353cf473c2b833d6812c07f087927bb56b (patch) | |
tree | 15191be62d92fe0d6af086e26e3d85ef2d4f4141 /common/pmu_tps65090_charger.c | |
parent | 088cd2c277c3828919cb86b05fd5ac3aad9c911a (diff) | |
download | chrome-ec-fd38ba353cf473c2b833d6812c07f087927bb56b.tar.gz |
Move PMU charger irq handler to charger module
No code changes; this is just moving the irq to the module which
actually handles it. This makes it simpler to disable the charger
task separately from the PMU module.
BUG=chrome-os-partner:18343
BRANCH=none
TEST=build pit, spring
Change-Id: Ife44a17f69bf21aa000d162318a459cea6fdf661
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/49334
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/pmu_tps65090_charger.c')
-rw-r--r-- | common/pmu_tps65090_charger.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/common/pmu_tps65090_charger.c b/common/pmu_tps65090_charger.c index 15bcbbd760..0d73fcc619 100644 --- a/common/pmu_tps65090_charger.c +++ b/common/pmu_tps65090_charger.c @@ -535,3 +535,13 @@ DECLARE_HOOK(HOOK_CHIPSET_STARTUP, pmu_chipset_events, HOOK_PRIO_DEFAULT); DECLARE_HOOK(HOOK_CHIPSET_SHUTDOWN, pmu_chipset_events, HOOK_PRIO_DEFAULT); DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, pmu_chipset_events, HOOK_PRIO_DEFAULT); DECLARE_HOOK(HOOK_CHIPSET_RESUME, pmu_chipset_events, HOOK_PRIO_DEFAULT); + +void pmu_irq_handler(enum gpio_signal signal) +{ +#ifdef CONFIG_AC_POWER_STATUS + gpio_set_level(GPIO_AC_STATUS, extpower_is_present()); +#endif + pmu_task_throttled_wake(); + CPRINTF("Charger IRQ received.\n"); +} + |