diff options
Diffstat (limited to 'driver')
-rw-r--r-- | driver/charger/isl923x.c | 7 | ||||
-rw-r--r-- | driver/charger/isl923x.h | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/driver/charger/isl923x.c b/driver/charger/isl923x.c index dbe6354476..e6e3042cb7 100644 --- a/driver/charger/isl923x.c +++ b/driver/charger/isl923x.c @@ -767,7 +767,7 @@ out: } #ifdef CONFIG_CHARGER_RAA489000 -void raa489000_hibernate(int chgnum) +void raa489000_hibernate(int chgnum, bool disable_adc) { int rv, regval; @@ -813,8 +813,9 @@ void raa489000_hibernate(int chgnum) rv = raw_read16(chgnum, ISL9238_REG_CONTROL3, ®val); if (!rv) { - /* ADC is active only when adapter plugged in */ - regval &= ~RAA489000_ENABLE_ADC; + if (disable_adc) + /* ADC is active only when adapter plugged in */ + regval &= ~RAA489000_ENABLE_ADC; rv = raw_write16(chgnum, ISL9238_REG_CONTROL3, regval); } diff --git a/driver/charger/isl923x.h b/driver/charger/isl923x.h index 0ae8327ed4..5da8649c38 100644 --- a/driver/charger/isl923x.h +++ b/driver/charger/isl923x.h @@ -9,6 +9,7 @@ #ifndef __CROS_EC_ISL923X_H #define __CROS_EC_ISL923X_H +#include "stdbool.h" #define ISL923X_ADDR_FLAGS (0x09) /* Registers */ @@ -378,7 +379,7 @@ int isl923x_set_comparator_inversion(int chgnum, int invert); * * @param chgnum index into chg_chips table. */ -void raa489000_hibernate(int chgnum); +void raa489000_hibernate(int chgnum, bool disable_adc); enum ec_error_list isl9238c_hibernate(int chgnum); enum ec_error_list isl9238c_resume(int chgnum); |