kernel: sbs-battery: Make POWER_SUPPLY_PROP_CAPACITY independent of CAPACITY_MODE |
||||
Issue descriptionAccording to the SB spec, POWER_SUPPLY_PROP_CAPACITY (AKA RelativeStateOfCharge() - 0xd) is not influenced by the CAPACITY_MODE bit. It shouldn't be necessary to call sbs_set_battery_mode() before reading this property.
,
Aug 25 2017
Can we close?
,
Aug 26 2017
,
Sep 25 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/3033074140423d0590342192919b09ebca8f1ccf commit 3033074140423d0590342192919b09ebca8f1ccf Author: Shawn Nematbakhsh <shawnn@chromium.org> Date: Mon Sep 25 03:19:04 2017 CHROMIUM: power: sbs-battery: Don't needlessly set CAPACITY_MODE According to the smart battery spec (1), the CAPACITY_MODE bit does not influence the value read from RelativeStateOfCharge(), so don't bother changing CAPACITY_MODE when doing such a read. (1) - Smart Battery Data Specification, Rev 1.1, Dec. 11, 1998 BUG= chromium:732479 TEST=On kevin, spam reads to battery 'capacity' sysfs attribute, verify that the value is monotonically decreasing when no charger is plugged. Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Change-Id: Ibc23575970bf32bf20cbf26d1291ed46b0312d0e Reviewed-on: https://chromium-review.googlesource.com/531787 Commit-Ready: Shawn N <shawnn@chromium.org> Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Guenter Roeck <groeck@chromium.org> (cherry picked from commit a060991669c871de8c6188c6119690224e5f9b90) Reviewed-on: https://chromium-review.googlesource.com/680675 Reviewed-by: Jeffy Chen <jeffy.chen@rock-chips.com> Commit-Queue: Jeffy Chen <jeffy.chen@rock-chips.com> Tested-by: Jeffy Chen <jeffy.chen@rock-chips.com> [modify] https://crrev.com/3033074140423d0590342192919b09ebca8f1ccf/drivers/power/sbs-battery.c |
||||
►
Sign in to add a comment |
||||
Comment 1 by bugdroid1@chromium.org
, Jul 14 2017