summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@google.com>2017-07-23 00:43:39 -0700
committerCommit Bot <commit-bot@chromium.org>2020-08-28 23:11:50 +0000
commit3358403f00abf8f83029145deb9217438c76ee11 (patch)
tree0e59b4d2bea746c7a0f36a7cca8028a038a1eee4
parentef3d914793c80d9ca396dea50eff54417c0a205c (diff)
downloadchrome-ec-3358403f00abf8f83029145deb9217438c76ee11.tar.gz
eve: Check physical battery presence before inhibiting power
In order to satisfy factory testing requirements we need to boot a bare board with just an AC adapter without requiring a power button. However we also don't want to always allow booting of the battery is present but cut-off (which will indicate BP_NO so we can't use the existing battery_is_present function) or has critically low level as it may not immediately boot. To accomplish this add a function that allows the board to specify a custom "hardware presence" for the battery that is separate from the battery presence check. This could also likely be accomplished by adding another state to "enum battery_present" but that could alter other behavior in the current charge state machine.. BUG=b:63957122 BRANCH=eve TEST=manual testing on Eve to ensure a board without a battery is allowed to power-up when power is first applied without requiring a power button press. Also ensure that a critically low or cut-off battery that does not try to immediately power up. Change-Id: Ia7c6b5ad5043aab15dbc99be7816353d6b92e720 Signed-off-by: Duncan Laurie <dlaurie@google.com> Reviewed-on: https://chromium-review.googlesource.com/582544 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2320004 Tested-by: Patryk Duda <pdk@semihalf.com> Commit-Queue: Patryk Duda <pdk@semihalf.com> Reviewed-by: Jett Rink <jettrink@chromium.org>
-rw-r--r--board/eve/board.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/board/eve/board.h b/board/eve/board.h
index 475c707a80..e59a204d1c 100644
--- a/board/eve/board.h
+++ b/board/eve/board.h
@@ -77,6 +77,7 @@
#define CONFIG_BATTERY_CUT_OFF
#define CONFIG_BATTERY_DEVICE_CHEMISTRY "LION"
#define CONFIG_BATTERY_PRESENT_CUSTOM
+#define CONFIG_BATTERY_HW_PRESENT_CUSTOM
#define CONFIG_BATTERY_SMART
/* Charger */