diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2017-03-03 09:34:44 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-03-03 17:11:30 -0800 |
commit | 7757a8e872588fda9643f31399c5641982e07439 (patch) | |
tree | fabf612c1ca485666c39c755720be27eb412da2e /include | |
parent | 9c24fac50542e2a391f509dad98303667c82c655 (diff) | |
download | chrome-ec-7757a8e872588fda9643f31399c5641982e07439.tar.gz |
charger: Add state for discharge + full
When battery is fully charged, Reef starts discharging to protect
battery and starts charging again when charge level goes down
around 95%. To prevent the battery LED from showing blue with the
charger plugged in, this patch adds a new state for discharge +
nearly full. Reef shows a color indicating battery is full if
an external charger is present.
BUG=b:35775017
BRANCH=none
TEST=Fully charge Electro. Plug in OEM charger. LED lights blue.
Change-Id: I4c7c62f2c51c1d39188d1b271331984e89d5d7a3
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/448961
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/charge_state.h | 3 | ||||
-rw-r--r-- | include/config.h | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/include/charge_state.h b/include/charge_state.h index 63c2df136e..0cf70c22de 100644 --- a/include/charge_state.h +++ b/include/charge_state.h @@ -35,6 +35,8 @@ enum charge_state { PWR_STATE_IDLE, /* Discharging */ PWR_STATE_DISCHARGE, + /* Discharging and fully charged */ + PWR_STATE_DISCHARGE_FULL, /* Charging */ PWR_STATE_CHARGE, /* Charging, almost fully charged */ @@ -61,6 +63,7 @@ enum charge_state { "idle0", \ "idle", \ "discharge", \ + "discharge_full", \ "charge", \ "charge_near_full", \ "error" \ diff --git a/include/config.h b/include/config.h index 8577194e8a..94ddba963c 100644 --- a/include/config.h +++ b/include/config.h @@ -2583,6 +2583,12 @@ /* A different config for the same update. TODO(vbendeb): dedup these */ #undef CONFIG_USB_UPDATE +/* + * If defined, charge_get_state returns a special status if battery is + * discharging and battery is nearly full. + */ +#undef CONFIG_PWR_STATE_DISCHARGE_FULL + /*****************************************************************************/ /* * Include board and core configs, since those hold the CONFIG_ constants for a |