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-29 22:42:37 +0000
commitdc52b5b9c097da9620fede757e5e23fae2de7a7e (patch)
tree5bdac8b2b69cdc02d9079c60d5d3ec597d49f63b
parent71407c0fbb0d653d0103e9b7ebd54e9ed7e8a5ce (diff)
downloadchrome-ec-dc52b5b9c097da9620fede757e5e23fae2de7a7e.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> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2383913 Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org> Tested-by: Edward Hill <ecgh@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 */