diff options
-rwxr-xr-x | board/winky/board.h | 1 | ||||
-rwxr-xr-x[-rw-r--r--] | driver/charger/bq24715.c | 6 | ||||
-rwxr-xr-x | include/config.h | 6 |
3 files changed, 13 insertions, 0 deletions
diff --git a/board/winky/board.h b/board/winky/board.h index 9e9700bb24..f3461b3f5c 100755 --- a/board/winky/board.h +++ b/board/winky/board.h @@ -19,6 +19,7 @@ #define CONFIG_CHARGER_DISCHARGE_ON_AC /* TODO(crosbug.com/p/25416): Add correct input current limit for Winky */ #define CONFIG_CHARGER_INPUT_CURRENT 2112 /* 30 W adapter, 12 V, 2.2 A */ +#define CONFIG_CHARGE_NVDC_OFF_VOLTAGE 8592 /* NVDC Off voltage */ #define CONFIG_CHARGER_SENSE_RESISTOR 10 /* Charge sense resistor, mOhm */ #define CONFIG_CHARGER_SENSE_RESISTOR_AC 10 /* Input senso resistor, mOhm */ #define CONFIG_CHIPSET_BAYTRAIL diff --git a/driver/charger/bq24715.c b/driver/charger/bq24715.c index c1f8a9156c..581bf534a7 100644..100755 --- a/driver/charger/bq24715.c +++ b/driver/charger/bq24715.c @@ -163,6 +163,12 @@ int charger_get_voltage(int *voltage) int charger_set_voltage(int voltage) { cached_voltage = voltage; + +#ifdef CONFIG_CHARGE_NVDC_OFF_VOLTAGE + if(voltage == 0) + voltage = CONFIG_CHARGE_NVDC_OFF_VOLTAGE; +#endif + return sbc_write(SB_CHARGING_VOLTAGE, voltage); } diff --git a/include/config.h b/include/config.h index 7b13bd5a6e..7a9d8f7d04 100755 --- a/include/config.h +++ b/include/config.h @@ -210,6 +210,12 @@ */ #undef CONFIG_CHARGER_INPUT_CURRENT +/* + * NVDC needs to keep voltage level though charging stop. + * This value should depend on charger. +*/ +#undef CONFIG_CHARGE_NVDC_OFF_VOLTAGE + /* Value of the charge sense resistor, in mOhms */ #undef CONFIG_CHARGER_SENSE_RESISTOR |