summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVijay Hiremath <vijay.p.hiremath@intel.com>2016-01-14 13:48:59 -0800
committerchrome-bot <chrome-bot@chromium.org>2016-01-15 00:36:52 -0800
commitdda6f888dc597d7e3be3e75b65e20690ebfc26c6 (patch)
treef8c40ad6a6991f92154c59e44d0ef6b3514a5a84
parent77abb5072e8a674d5908dd2366583148858e56c9 (diff)
downloadchrome-ec-dda6f888dc597d7e3be3e75b65e20690ebfc26c6.tar.gz
Driver: ISL9237: Configure Prochot# Debounce time to maximum
Configured the Prochot# Debounce time to maximum (1ms) to avoid false triggers on the Prochot pin. BUG=none TEST=Manually tested on Kunimitsu, Prochot pin in not triggered when the battery current ripples or the adapter current ripples are less than 1ms. BRANCH=none Change-Id: I3ccebcfbced2285dcacff8a3750090c0500a102c Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/322292 Commit-Ready: Vijay P Hiremath <vijay.p.hiremath@intel.com> Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Kevin K Wong <kevin.k.wong@intel.com> Reviewed-by: Shawn N <shawnn@chromium.org>
-rw-r--r--driver/charger/isl9237.c13
-rw-r--r--driver/charger/isl9237.h1
2 files changed, 13 insertions, 1 deletions
diff --git a/driver/charger/isl9237.c b/driver/charger/isl9237.c
index 2d8c78190b..7ac3cdbd73 100644
--- a/driver/charger/isl9237.c
+++ b/driver/charger/isl9237.c
@@ -226,6 +226,19 @@ int charger_post_init(void)
return rv;
#endif
+ /*
+ * [10:9]: Prochot# Debounce time
+ * 11b: 1ms
+ */
+ rv = raw_read16(ISL9237_REG_CONTROL2, &reg);
+ if (rv)
+ return rv;
+
+ rv = raw_write16(ISL9237_REG_CONTROL2,
+ reg | ISL9237_C2_PROCHOT_DEBOUNCE_1000);
+ if (rv)
+ return rv;
+
rv = charger_get_option(&reg);
if (rv)
return rv;
diff --git a/driver/charger/isl9237.h b/driver/charger/isl9237.h
index 4bca168ff4..27a3bab377 100644
--- a/driver/charger/isl9237.h
+++ b/driver/charger/isl9237.h
@@ -26,7 +26,6 @@
#define ISL9237_REG_OTG_CURRENT 0x4a
#define ISL9237_REG_MANUFACTURER_ID 0xfe
#define ISL9237_REG_DEVICE_ID 0xff
-#define ISL9237_REG_PROCHOT_TIME 0x39
#define ISL9237_REG_CONTROL0 0x39
/* Sense resistor default values in mOhm */