diff options
author | Philip Chen <philipchen@google.com> | 2018-02-12 18:26:24 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-02-14 00:48:26 -0800 |
commit | dc170640c7edc2bc0c4ff54f6ffe844a082424c9 (patch) | |
tree | c3868ba9c08c9fb8ee48c478efbe589d953a465a /driver | |
parent | c07cbae93ca50c1c3b2565d82119f23ad6011c6f (diff) | |
download | chrome-ec-dc170640c7edc2bc0c4ff54f6ffe844a082424c9.tar.gz |
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>
Diffstat (limited to 'driver')
-rw-r--r-- | driver/charger/rt946x.c | 4 | ||||
-rw-r--r-- | driver/charger/rt946x.h | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/driver/charger/rt946x.c b/driver/charger/rt946x.c index 6d1eacc6a9..9fb08a03c2 100644 --- a/driver/charger/rt946x.c +++ b/driver/charger/rt946x.c @@ -366,6 +366,10 @@ static int rt946x_init_setting(void) 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); if (rv) return rv; diff --git a/driver/charger/rt946x.h b/driver/charger/rt946x.h index 481277726f..80f18bd4ee 100644 --- a/driver/charger/rt946x.h +++ b/driver/charger/rt946x.h @@ -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 |