charger/rt946x: Disable charge timer

If the charge timer expires, rt946x would stop charging.
We don't need this function.

BUG=b:72571372
BRANCH=scarlet
TEST=read reg 0x12 and confirm TMR_EN == 0

Change-Id: I38137ac39c7e7dfd15f12342428708697f81922c
Signed-off-by: Philip Chen <philipchen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/915501
Commit-Ready: Philip Chen <philipchen@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: David Schneider <dnschneid@chromium.org>
This commit is contained in:
Philip Chen
2018-02-12 18:26:24 -08:00
committed by chrome-bot
parent c07cbae93c
commit dc170640c7
2 changed files with 9 additions and 0 deletions

View File

@@ -364,6 +364,10 @@ static int rt946x_init_setting(void)
return rv;
/* Disable battery thermal protection */
rv = rt946x_clr_bit(RT946X_REG_CHGCTRL16, RT946X_MASK_JEITA_EN);
if (rv)
return rv;
/* Disable charge timer */
rv = rt946x_clr_bit(RT946X_REG_CHGCTRL12, RT946X_MASK_TMR_EN);
if (rv)
return rv;
rv = rt946x_set_mivr(rt946x_charger_init_setting.mivr);

View File

@@ -189,6 +189,11 @@
#define RT946X_MASK_BOOST_CURRENT 0x07
/* ========== CHGCTRL12 0x0C ============ */
#define RT946X_SHIFT_TMR_EN 1
#define RT946X_MASK_TMR_EN (1 << RT946X_SHIFT_TMR_EN)
/* ========== CHGCTRL13 0x0D ============ */
#define RT946X_SHIFT_WDT_EN 7