summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlec Berg <alecaberg@chromium.org>2015-01-26 09:21:16 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-01-26 21:01:50 +0000
commit2737321ecda82335bada3aa4d6530de83a8985bb (patch)
tree952d02790e4bb177648bcf62a0bc17550430c0f2
parent6fb8ab3369f454e51fa2ef6bcbf14dc0a9919912 (diff)
downloadchrome-ec-2737321ecda82335bada3aa4d6530de83a8985bb.tar.gz
bq24773: turn off prochot warning
Turn off prochot warning on bq24773 by default because our battery can always supply enough power for the whole system so we don't need to throttle the CPU if the BQ senses too much input current. BUG=chrome-os-partner:34885 BRANCH=samus TEST=force BQ into it's prochot condition on samus by setting the charging voltage temporarily below the battery voltage, which causes INA to turn off and the BQ to think IADP is > 4.1A. in this condition PROCHOT is normally asserted and CPU slows down, but with this patch PROCHOT is not asserted and the CPU does not slow down. Change-Id: I658dbe568b7bfe94944ef90d6d59656a0683c8a0 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/243231 Reviewed-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-by: Sameer Nanda <snanda@chromium.org>
-rw-r--r--driver/charger/bq24773.c4
-rw-r--r--driver/charger/bq24773.h6
2 files changed, 7 insertions, 3 deletions
diff --git a/driver/charger/bq24773.c b/driver/charger/bq24773.c
index 45faff9d23..fc5e7c688c 100644
--- a/driver/charger/bq24773.c
+++ b/driver/charger/bq24773.c
@@ -184,6 +184,10 @@ int charger_post_init(void)
if (rv)
return rv;
+ /* Turn off PROCHOT warning */
+ rv = i2c_write8(I2C_PORT_CHARGER, BQ24773_ADDR,
+ BQ24773_PROCHOT_OPTION1, 0);
+
#ifdef CONFIG_CHARGER_ILIM_PIN_DISABLED
/* Read the external ILIM pin enabled flag. */
rv = i2c_read16(I2C_PORT_CHARGER, BQ24773_ADDR,
diff --git a/driver/charger/bq24773.h b/driver/charger/bq24773.h
index 0e762624a8..d4e167ca7a 100644
--- a/driver/charger/bq24773.h
+++ b/driver/charger/bq24773.h
@@ -14,9 +14,9 @@
/* Chip specific commands */
#define BQ24773_CHARGE_OPTION0 0x00
#define BQ24773_CHARGE_OPTION1 0x02
-#define BQ24773_PROTECT_OPTION0 0x04
-#define BQ24773_PROTECT_OPTION1 0x06
-#define BQ24773_PROTECT_STATUS 0x08
+#define BQ24773_PROCHOT_OPTION0 0x04
+#define BQ24773_PROCHOT_OPTION1 0x06
+#define BQ24773_PROCHOT_STATUS 0x08
#define BQ24773_DEVICE_ADDRESS 0x09
#define BQ24773_CHARGE_CURRENT 0x0A
#define BQ24773_MAX_CHARGE_VOLTAGE 0x0C