eve: Check physical battery presence before inhibiting power
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 <70662b43bc1a20b57ded72a2b08be88dd0da4841@google.com>
Reviewed-on: https://chromium-review.googlesource.com/582544
Reviewed-by: Furquan Shaikh <6be5c96c464778f89679b1062a2e0a6af93d2aa5@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2320004
Tested-by: Patryk Duda <6aed17a362577cf10cb5675888c1635d522769c1@semihalf.com>
Commit-Queue: Patryk Duda <6aed17a362577cf10cb5675888c1635d522769c1@semihalf.com>
Reviewed-by: Jett Rink <9d4aef0593e6843318d99df31597fb6153b89787@chromium.org>

coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec