isl9237: Fix HW ramp setting in charger_post_init

While introducing support for isl9238, I accidentally used an
incorrect config option (CONFIG_ISL9237), instead of
CONFIG_CHARGER_ISL9237.

BRANCH=none
BUG=b:35585464
TEST=make buildall -j

Fixes: b1101b8ed6 charger: isl923x: Add support for ISL9238

Change-Id: I2f62f3fbefbc60cc9d83726ef88a66c5c9f1b245
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/725121
Reviewed-by: Rong Chang <rongchang@chromium.org>
This commit is contained in:
Nicolas Boichat
2017-10-18 10:16:53 +08:00
committed by chrome-bot
parent b9e07ce1bf
commit 8434ed8f10

View File

@@ -253,14 +253,14 @@ int charger_post_init(void)
return rv;
#ifdef CONFIG_CHARGE_RAMP_HW
#ifdef CONFIG_ISL9237
#ifdef CONFIG_CHARGER_ISL9237
rv = charger_get_option(&reg);
if (rv)
return rv;
/* Set input voltage regulation reference voltage for charge ramp */
reg &= ~ISL923X_C0_VREG_REF_MASK;
reg |= ISL923X_C0_VREG_REF_4200;
reg &= ~ISL9237_C0_VREG_REF_MASK;
reg |= ISL9237_C0_VREG_REF_4200;
return charger_set_option(reg);
#else