summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorVic Yang <victoryang@chromium.org>2013-02-20 21:27:37 +0800
committerChromeBot <chrome-bot@google.com>2013-02-20 09:22:43 -0800
commit070943e9bfa2530603bb84ddaecd209aa53208da (patch)
tree8bec0cf81b64f2e50a6df5dd63802c1b4643f795 /common
parent95253a68dd9ec77388d6556f384299ecb80cfb7e (diff)
downloadchrome-ec-070943e9bfa2530603bb84ddaecd209aa53208da.tar.gz
spring: Handle dead battery and booting with low power charger
This tweaks initial PWM configuration so that: - When battery is dead, more current is allowed to sustain the system. - When EC boots with a low power charger, input current is throttled so as not to kill the charger. BUG=chrome-os-partner:14319 TEST=Manual BRANCH=none Change-Id: Ib52894b07fecdd533aecab312f40afa0b6df5676 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/43600 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/pmu_tps65090_charger.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/pmu_tps65090_charger.c b/common/pmu_tps65090_charger.c
index 3df1ef3350..4881de5aa7 100644
--- a/common/pmu_tps65090_charger.c
+++ b/common/pmu_tps65090_charger.c
@@ -390,6 +390,8 @@ void pmu_charger_task(void)
disable_sleep(SLEEP_MASK_CHARGING);
#ifdef CONFIG_TSU6721
+ board_pwm_init_limit();
+
/*
* Somehow TSU6721 comes up slowly. Let's wait for a moment before
* accessing it.
@@ -399,6 +401,7 @@ void pmu_charger_task(void)
tsu6721_init(); /* Init here until we can do with HOOK_INIT */
gpio_enable_interrupt(GPIO_USB_CHG_INT);
+ msleep(100); /* TSU6721 doesn't work properly right away. */
board_usb_charge_update(1);
#endif