diff options
author | YongBeum.Ha <ybha@samsung.corp-partner.google.com> | 2021-04-16 14:03:17 +0900 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-04-16 07:17:15 +0000 |
commit | 862e4d0da76cc65bce9e934059c40ac7e64a94c5 (patch) | |
tree | 93e5d195d733dc66078ac06b4ae630b9091d3c55 | |
parent | ae2aad5d949c9d8c8d70fcab271c9a4f50aa56e5 (diff) | |
download | chrome-ec-862e4d0da76cc65bce9e934059c40ac7e64a94c5.tar.gz |
raa489000 : control ALERT_B when wake from hibernation
When 'Enable ADC' on Control3 is cleared,
EN_DIS_MCU_LDO_IN_BAT on Control8 and EN_DIS_GP_COMP_IN_BAT
on Control4 must be cleared to set ALERT_B.
BUG=b:185434129
BRANCH=none
TEST=make -j BOARD=sasuke
Signed-off-by: YongBeum.Ha <ybha@samsung.corp-partner.google.com>
Change-Id: I6f77c0cfb727a66128ef95115a02d2fd49a04ad9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2830654
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
-rw-r--r-- | driver/charger/isl923x.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/driver/charger/isl923x.c b/driver/charger/isl923x.c index 0bac8c608c..33a669b5ef 100644 --- a/driver/charger/isl923x.c +++ b/driver/charger/isl923x.c @@ -741,15 +741,26 @@ static void isl923x_init(int chgnum) /* * Ignore BATGONE on auxiliary charger ICs as it's not connected * there. + * Clear DISABLE_GP_CMP & MCU_LDO_BAT_STATE_DISABLE to + * enable ALERT_B with control the power of sub-board */ if (chgnum != CHARGER_PRIMARY) { if (raw_read16(chgnum, ISL9238_REG_CONTROL4, ®)) goto init_fail; reg |= RAA489000_C4_BATGONE_DISABLE; + reg &= ~RAA489000_C4_DISABLE_GP_CMP; if (raw_write16(chgnum, ISL9238_REG_CONTROL4, reg)) goto init_fail; + + if (raw_read16(chgnum, RAA489000_REG_CONTROL8, ®)) + goto init_fail; + + reg &= ~RAA489000_C8_MCU_LDO_BAT_STATE_DISABLE; + + if (raw_write16(chgnum, RAA489000_REG_CONTROL8, reg)) + goto init_fail; } } #endif /* CONFIG_OCPC */ |