summaryrefslogtreecommitdiff
path: root/board/eve
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@google.com>2017-09-12 19:30:32 -0700
committerCommit Bot <commit-bot@chromium.org>2020-09-04 21:33:52 +0000
commite7352ce69296f4e7a9e30149caa009b28be4fc9b (patch)
tree619a2014f65a6256c5f974f2a4c5967ea92429f9 /board/eve
parent814df43e0a2b778952b3a10394514ad99c2bc2e7 (diff)
downloadchrome-ec-e7352ce69296f4e7a9e30149caa009b28be4fc9b.tar.gz
eve: Re-enable discharge-on-ac for all boards
Enable discharge on ac when battery is full. BUG=b:64913617 BRANCH=eve TEST=test that when on AC and battery is full it goes into discharge mode Change-Id: I71397e7f0b24e449b13c00da87c8f81cfd806c2c Signed-off-by: Duncan Laurie <dlaurie@google.com> Reviewed-on: https://chromium-review.googlesource.com/662907 Reviewed-by: Scott Collyer <scollyer@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2320259 Tested-by: Patryk Duda <pdk@semihalf.com> Commit-Queue: Patryk Duda <pdk@semihalf.com> Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'board/eve')
-rw-r--r--board/eve/battery.c2
-rw-r--r--board/eve/board.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/board/eve/battery.c b/board/eve/battery.c
index 0acde9259e..ea915567a6 100644
--- a/board/eve/battery.c
+++ b/board/eve/battery.c
@@ -179,7 +179,7 @@ static int charger_should_discharge_on_ac(struct charge_state_data *curr)
* To overcome this issue enable the battery learning operation
* and suspend USB charging and DC/DC converter.
*/
- if ((board_get_version() < 5) && !battery_is_cut_off() &&
+ if (!battery_is_cut_off() &&
!(curr->batt.flags & BATT_FLAG_WANT_CHARGE) &&
(curr->batt.status & STATUS_FULLY_CHARGED))
return 1;
diff --git a/board/eve/board.h b/board/eve/board.h
index 76cab3d178..1a9016f1a5 100644
--- a/board/eve/board.h
+++ b/board/eve/board.h
@@ -82,6 +82,7 @@
#define CONFIG_BATTERY_CRITICAL_SHUTDOWN_CUT_OFF
#define CONFIG_BATTERY_CUT_OFF
#define CONFIG_BATTERY_DEVICE_CHEMISTRY "LION"
+#define CONFIG_BATTERY_LEVEL_NEAR_FULL 94
#define CONFIG_BATTERY_PRESENT_CUSTOM
#define CONFIG_BATTERY_HW_PRESENT_CUSTOM
#define CONFIG_BATTERY_SMART
@@ -112,6 +113,7 @@
#define CONFIG_POWER_BUTTON_X86
#define CONFIG_POWER_COMMON
#define CONFIG_POWER_SIGNAL_INTERRUPT_STORM_DETECT_THRESHOLD 30
+#define CONFIG_PWR_STATE_DISCHARGE_FULL
/* Sensor */
#define CONFIG_MKBP_EVENT