summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2013-06-12 16:24:15 -0700
committerBill Richardson <wfrichar@chromium.org>2013-06-13 09:02:13 -0700
commitc09f37cf09adb1150d1ec3b8282f1e91bad4b8ad (patch)
tree7e07e2cef03842c7de674cef3509885a9bc87bfe
parentdcbaa1c80d6aa61da1b526c4cc366fa3ade2e74f (diff)
downloadchrome-ec-c09f37cf09adb1150d1ec3b8282f1e91bad4b8ad.tar.gz
Falco: Placeholder to maybe disable IFAULT_HI on battery charger
We've been asked to disable the IFAULT_HI protection for the Falco battery charger, with no explanation. This change adds the code to do that, but leaves it ifdef'd out. If/when we get confirmation that we really want to do that, we can. BUG=chrome-os-partner:19868 BRANCH=none TEST=none No functional change yet, nothing to test. Change-Id: I02a71461f55849a2fdb5ec220fe00e3c812ddf0b Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/58467
-rw-r--r--common/charger_bq24738.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/common/charger_bq24738.c b/common/charger_bq24738.c
index 601826f22a..a578196ddc 100644
--- a/common/charger_bq24738.c
+++ b/common/charger_bq24738.c
@@ -173,8 +173,22 @@ int charger_set_voltage(int voltage)
/* Charging power state initialization */
int charger_post_init(void)
{
- /* Accept POR defaults, plus... */
+ int rv;
+
+/* FIXME(crosbug.com/p/19868): Do we want this or not? */
+#if 0
+ int val;
+
+ rv = charger_get_option(&val);
+ if (rv)
+ return rv;
+ val &= ~OPTION_IFAULT_HI_ENABLE;
+ rv = charger_set_option(val);
+ if (rv)
+ return rv;
+#endif
/* Set charger input current limit */
- return charger_set_input_current(CONFIG_CHARGER_INPUT_CURRENT);
+ rv = charger_set_input_current(CONFIG_CHARGER_INPUT_CURRENT);
+ return rv;
}