summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVic Yang <victoryang@chromium.org>2013-07-30 05:23:18 +0800
committerChromeBot <chrome-bot@google.com>2013-07-29 16:36:28 -0700
commit6ec9723e938b078d7df19d987add0bd1bc8af81f (patch)
tree285f0abd0831d862e95a1d69ca1b826dfe30702b
parentf6cdb48f67bf22f62f876bb46f3503e784cafacb (diff)
downloadchrome-ec-6ec9723e938b078d7df19d987add0bd1bc8af81f.tar.gz
spring: Update TPS65090 registers on AC change
If TPS65090 is in some weird state, this helps us ensure that charging can be done properly. BUG=chrome-os-partner:21107 TEST=Plug in the charger and check TPS65090 registers are updated. BRANCH=Spring Change-Id: I3b9133fba6eb114761506778a338cd3869052da1 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/63635 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r--common/pmu_tps65090.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/common/pmu_tps65090.c b/common/pmu_tps65090.c
index dd5a8f9076..15e4092dda 100644
--- a/common/pmu_tps65090.c
+++ b/common/pmu_tps65090.c
@@ -602,14 +602,13 @@ void pmu_init(void)
board_hard_reset();
}
}
-
-/* Initializes PMU when power is turned on. This is necessary because the TPS'
- * 3.3V rail is not powered until the power is turned on. */
-static void pmu_chipset_startup(void)
-{
- pmu_init();
-}
-DECLARE_HOOK(HOOK_CHIPSET_STARTUP, pmu_chipset_startup, HOOK_PRIO_DEFAULT);
+/*
+ * Initializes PMU when power is turned on. This is necessary because the TPS'
+ * 3.3V rail is not powered until the power is turned on.
+ * Also, on AC status change, update the registers to make sure we can charge.
+ */
+DECLARE_HOOK(HOOK_CHIPSET_STARTUP, pmu_init, HOOK_PRIO_DEFAULT);
+DECLARE_HOOK(HOOK_AC_CHANGE, pmu_init, HOOK_PRIO_DEFAULT);
#ifdef CONFIG_CMD_PMU
static int print_pmu_info(void)