diff options
author | Peter Marheine <pmarheine@chromium.org> | 2023-04-27 10:37:45 +1000 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-04-27 23:20:02 +0000 |
commit | ae68afbb5d58ce7af0be3e04f833900b105021cd (patch) | |
tree | 90a1aa6a75a46ad9b8d73c42529a37e235284723 /include | |
parent | 04ee1f52a8996765b26c5f01ae8559026ac58bad (diff) | |
download | chrome-ec-ae68afbb5d58ce7af0be3e04f833900b105021cd.tar.gz |
sm5803: add tests for set_vsys_compensation
Two bugs in the driver were exposed by this test and are fixed:
* All 8 bits of IR_COMP_REG2 are used as resistance value (in addition
to bits 6 and 7 of IR_COMP_REG1), but the driver incorrectly masked
off bit 7 which would cause incorrect values to be programmed when
resistance is greater than 212 mΩ.
* sm5803_set_vsys_compensation always returned an error, which apparently
goes unchecked by regular charger code.
BUG=b:242544165
TEST=./twister -ci -T zephyr/test/drivers/ -s drivers.sm5803
BRANCH=none
Change-Id: I761c3523d9903c3498cfe30d93ddb56b004cc4ef
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4482275
Reviewed-by: Tristan Honscheid <honscheid@google.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions