EC: Announce charge state change |
|||
Issue descriptionCurrently, charge level changes are announced via HOOK_BATTERY_SOC_CHANGE but charge state changes (i.e. enum charge_state_v2) aren't announced. Because of this, a charge LED is controlled by HOOK_TICK (and polling charge status by charge_get_state). Instead of checking charge status every 200 msec (or 500 msec), we should change a charge LED only when charge status changes. It can be done by HOOK_BATTERY_SOC_CHANGE or by introducing a new hook.
,
Mar 29 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/46b2618d72f67570a2a77711889b670aa64c6c51 commit 46b2618d72f67570a2a77711889b670aa64c6c51 Author: Daisuke Nojiri <dnojiri@chromium.org> Date: Thu Mar 29 02:34:32 2018 chgstv2: Notify charge state transition Currently, charge state changes (i.e. enum charge_state_v2) are not announced. Because of this, a charge LED is controlled by HOOK_TICK (and polling charge status by charge_get_state). Instead of checking charge status every 200 msec (or 500 msec), we should change a charge LED only when charge status changes. This patch makes HOOK_BATTERY_SOC_CHANGE get notified when charge state transitions. BUG= chromium:824942 BRANCH=none TEST=On Nami, try AC plug/unplug, battery connect/disconnect. Change-Id: I47a9542035666636d55f414e857d55ec36d69638 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/981397 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> [modify] https://crrev.com/46b2618d72f67570a2a77711889b670aa64c6c51/common/charge_state_v2.c
,
Mar 29 2018
,
Apr 6 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/2a6fd1511b4d8df143d6cc848384deadfcf26132 commit 2a6fd1511b4d8df143d6cc848384deadfcf26132 Author: Daisuke Nojiri <dnojiri@chromium.org> Date: Fri Apr 06 03:13:00 2018 chgstv2: Notify charge state transition Currently, charge state changes (i.e. enum charge_state_v2) are not announced. Because of this, a charge LED is controlled by HOOK_TICK (and polling charge status by charge_get_state). Instead of checking charge status every 200 msec (or 500 msec), we should change a charge LED only when charge status changes. This patch makes HOOK_BATTERY_SOC_CHANGE get notified when charge state transitions. BUG= chromium:824942 BRANCH=none TEST=On Nami, try AC plug/unplug, battery connect/disconnect. Change-Id: I47a9542035666636d55f414e857d55ec36d69638 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/981397 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> (cherry picked from commit 46b2618d72f67570a2a77711889b670aa64c6c51) Reviewed-on: https://chromium-review.googlesource.com/998853 Reviewed-by: Philip Chen <philipchen@chromium.org> Commit-Queue: Philip Chen <philipchen@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org> [modify] https://crrev.com/2a6fd1511b4d8df143d6cc848384deadfcf26132/common/charge_state_v2.c |
|||
►
Sign in to add a comment |
|||
Comment 1 by vpalatin@google.com
, Mar 23 2018