New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 732479 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

kernel: sbs-battery: Make POWER_SUPPLY_PROP_CAPACITY independent of CAPACITY_MODE

Project Member Reported by sha...@chromium.org, Jun 12 2017

Issue description

According 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.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 14 2017

Labels: merge-merged-chromeos-4.4
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/a060991669c871de8c6188c6119690224e5f9b90

commit a060991669c871de8c6188c6119690224e5f9b90
Author: Shawn Nematbakhsh <shawnn@chromium.org>
Date: Fri Jul 14 02:46: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>

[modify] https://crrev.com/a060991669c871de8c6188c6119690224e5f9b90/drivers/power/sbs-battery.c

Comment 2 by tbroch@chromium.org, Aug 25 2017

Owner: sha...@chromium.org
Status: Assigned (was: Untriaged)
Can we close?

Comment 3 by sha...@chromium.org, Aug 26 2017

Status: Verified (was: Assigned)
Project Member

Comment 4 by bugdroid1@chromium.org, Sep 25 2017

Labels: merge-merged-factory-gru-9017.B-chromeos-4.4
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