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>
This commit is contained in:
Vijay Hiremath
2016-01-14 13:48:59 -08:00
committed by chrome-bot
parent 77abb5072e
commit dda6f888dc
2 changed files with 13 additions and 1 deletions

View File

@@ -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;

View File

@@ -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 */