diff options
author | Ting Shen <phoenixshen@google.com> | 2019-12-02 15:27:57 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-09-13 17:33:44 +0000 |
commit | 318557af840588d1c0e95b505f828abbf39363e4 (patch) | |
tree | 59203bb1ca581bc667224475ff0a983e85894e4f /include/usb_common.h | |
parent | 236c7e158d6d3482afa29505d7da718a5598c939 (diff) | |
download | chrome-ec-318557af840588d1c0e95b505f828abbf39363e4.tar.gz |
kodama: overwrite bad battery params to known good value
Kodama's bitbang driver fails randomly, and there's no way to notify
kernel side that bitbang read failed (batt->flags does not propagate
into kernel).
Thus, if any value in batt_params is bad, replace it with a cached
good value, to make sure we never send random numbers to kernel side.
BUG=b:144195782
TEST=Modify smart battery driver to make sb_read has 50% fail rate,
and monitor /sys/class/power_supply/sbs*/*, make sure the bad values
does not observable in kernel.
BRANCH=kukui
Change-Id: Idf4691eb743f1ef785593b308b8f07a34e5ea642
Signed-off-by: Ting Shen <phoenixshen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1943637
Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Tested-by: Ting Shen <phoenixshen@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3872709
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Auto-Submit: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'include/usb_common.h')
0 files changed, 0 insertions, 0 deletions