All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv1 00/19] Improve SBS battery support
@ 2020-05-13 18:55 Sebastian Reichel
  2020-05-13 18:55 ` [PATCHv1 01/19] kobject: increase allowed number of uevent variables Sebastian Reichel
                   ` (21 more replies)
  0 siblings, 22 replies; 37+ messages in thread
From: Sebastian Reichel @ 2020-05-13 18:55 UTC (permalink / raw)
  To: Sebastian Reichel, Rob Herring, Greg Kroah-Hartman, Rafael J . Wysocki
  Cc: linux-pm, devicetree, linux-kernel, kernel, Sebastian Reichel

This patchset improves support for SBS compliant batteries. Due to
the changes, the battery now exposes 32 power supply properties and
(un)plugging it generates a backtrace containing the following message
without the first patch in this series:

---------------------------
WARNING: CPU: 0 PID: 20 at lib/kobject_uevent.c:659 add_uevent_var+0xd4/0x104
add_uevent_var: too many keys
---------------------------

For references this is what an SBS battery status looks like after
the patch series has been applied:

cat /sys/class/power_supply/sbs-0-000b/uevent 
POWER_SUPPLY_NAME=sbs-0-000b
POWER_SUPPLY_TYPE=Battery
POWER_SUPPLY_STATUS=Discharging
POWER_SUPPLY_CAPACITY_LEVEL=Normal
POWER_SUPPLY_HEALTH=Good
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_CYCLE_COUNT=12
POWER_SUPPLY_VOLTAGE_NOW=11441000
POWER_SUPPLY_CURRENT_NOW=-26000
POWER_SUPPLY_CURRENT_AVG=-24000
POWER_SUPPLY_CAPACITY=76
POWER_SUPPLY_CAPACITY_ERROR_MARGIN=1
POWER_SUPPLY_TEMP=198
POWER_SUPPLY_TIME_TO_EMPTY_AVG=438600
POWER_SUPPLY_TIME_TO_FULL_AVG=3932100
POWER_SUPPLY_SERIAL_NUMBER=0000
POWER_SUPPLY_VOLTAGE_MIN_DESIGN=10800000
POWER_SUPPLY_VOLTAGE_MAX_DESIGN=10800000
POWER_SUPPLY_ENERGY_NOW=31090000
POWER_SUPPLY_ENERGY_FULL=42450000
POWER_SUPPLY_ENERGY_FULL_DESIGN=41040000
POWER_SUPPLY_CHARGE_NOW=2924000
POWER_SUPPLY_CHARGE_FULL=3898000
POWER_SUPPLY_CHARGE_FULL_DESIGN=3800000
POWER_SUPPLY_CONSTANT_CHARGE_CURRENT_MAX=3000000
POWER_SUPPLY_CONSTANT_CHARGE_VOLTAGE_MAX=12300000
POWER_SUPPLY_MANUFACTURE_YEAR=2017
POWER_SUPPLY_MANUFACTURE_MONTH=7
POWER_SUPPLY_MANUFACTURE_DAY=3
POWER_SUPPLY_MANUFACTURER=UR18650A
POWER_SUPPLY_MODEL_NAME=GEHC

-- Sebastian

Jean-Francois Dagenais (1):
  power: supply: sbs-battery: add ability to disable charger broadcasts

Sebastian Reichel (18):
  kobject: increase allowed number of uevent variables
  power: supply: core: add capacity error margin property
  power: supply: core: add manufacture date properties
  power: supply: core: add POWER_SUPPLY_HEALTH_CALIBRATION_REQUIRED
  power: supply: sbs-battery: Add TI BQ20Z65 support
  power: supply: sbs-battery: add
    POWER_SUPPLY_PROP_CAPACITY_ERROR_MARGIN support
  power: supply: sbs-battery: simplify read_read_string_data
  power: supply: sbs-battery: add PEC support
  power: supply: sbs-battery: add POWER_SUPPLY_PROP_CURRENT_AVG support
  power: supply: sbs-battery: Improve POWER_SUPPLY_PROP_TECHNOLOGY
    support
  power: supply: sbs-battery: add
    POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT/VOLTAGE_MAX support
  power: supply: sbs-battery: add MANUFACTURE_DATE support
  power: supply: sbs-battery: add
    POWER_SUPPLY_HEALTH_CALIBRATION_REQUIRED support
  power: supply: sbs-battery: fix idle battery status
  power: supply: sbs-battery: switch from of_property_* to
    device_property_*
  power: supply: sbs-battery: switch to i2c's probe_new
  power: supply: sbs-battery: constify power-supply property array
  dt-bindings: power: sbs-battery: Convert to yaml

 Documentation/ABI/testing/sysfs-class-power   |  45 ++-
 .../power/supply/sbs,sbs-battery.yaml         |  83 +++++
 .../bindings/power/supply/sbs_sbs-battery.txt |  27 --
 drivers/power/supply/power_supply_sysfs.c     |   5 +
 drivers/power/supply/sbs-battery.c            | 348 +++++++++++++-----
 include/linux/kobject.h                       |   2 +-
 include/linux/power_supply.h                  |   5 +
 7 files changed, 404 insertions(+), 111 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/power/supply/sbs,sbs-battery.yaml
 delete mode 100644 Documentation/devicetree/bindings/power/supply/sbs_sbs-battery.txt

-- 
2.26.2


^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2020-06-03 18:49 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-13 18:55 [PATCHv1 00/19] Improve SBS battery support Sebastian Reichel
2020-05-13 18:55 ` [PATCHv1 01/19] kobject: increase allowed number of uevent variables Sebastian Reichel
2020-05-14  6:11   ` Greg Kroah-Hartman
2020-05-15 14:45   ` Emil Velikov
2020-05-13 18:55 ` [PATCHv1 02/19] power: supply: core: add capacity error margin property Sebastian Reichel
2020-05-13 18:55 ` [PATCHv1 03/19] power: supply: core: add manufacture date properties Sebastian Reichel
2020-05-15 14:47   ` Emil Velikov
2020-05-15 15:14     ` Sebastian Reichel
2020-05-15 16:01       ` Emil Velikov
2020-05-13 18:56 ` [PATCHv1 04/19] power: supply: core: add POWER_SUPPLY_HEALTH_CALIBRATION_REQUIRED Sebastian Reichel
2020-05-13 18:56 ` [PATCHv1 05/19] power: supply: sbs-battery: Add TI BQ20Z65 support Sebastian Reichel
2020-05-28  2:37   ` Rob Herring
2020-05-13 18:56 ` [PATCHv1 06/19] power: supply: sbs-battery: add POWER_SUPPLY_PROP_CAPACITY_ERROR_MARGIN support Sebastian Reichel
2020-05-13 18:56 ` [PATCHv1 07/19] power: supply: sbs-battery: simplify read_read_string_data Sebastian Reichel
2020-05-13 18:56 ` [PATCHv1 08/19] power: supply: sbs-battery: add PEC support Sebastian Reichel
2020-05-13 18:56 ` [PATCHv1 09/19] power: supply: sbs-battery: add POWER_SUPPLY_PROP_CURRENT_AVG support Sebastian Reichel
2020-05-13 18:56 ` [PATCHv1 10/19] power: supply: sbs-battery: Improve POWER_SUPPLY_PROP_TECHNOLOGY support Sebastian Reichel
2020-05-13 18:56 ` [PATCHv1 11/19] power: supply: sbs-battery: add POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT/VOLTAGE_MAX support Sebastian Reichel
2020-05-13 18:56 ` [PATCHv1 12/19] power: supply: sbs-battery: add MANUFACTURE_DATE support Sebastian Reichel
2020-05-13 18:56 ` [PATCHv1 13/19] power: supply: sbs-battery: add POWER_SUPPLY_HEALTH_CALIBRATION_REQUIRED support Sebastian Reichel
2020-05-15 15:35   ` Emil Velikov
2020-05-13 18:56 ` [PATCHv1 14/19] power: supply: sbs-battery: fix idle battery status Sebastian Reichel
2020-05-13 18:56 ` [PATCHv1 15/19] power: supply: sbs-battery: add ability to disable charger broadcasts Sebastian Reichel
2020-05-15 14:57   ` Emil Velikov
2020-05-13 18:56 ` [PATCHv1 16/19] power: supply: sbs-battery: switch from of_property_* to device_property_* Sebastian Reichel
2020-05-13 18:56 ` [PATCHv1 17/19] power: supply: sbs-battery: switch to i2c's probe_new Sebastian Reichel
2020-05-13 18:56 ` [PATCHv1 18/19] power: supply: sbs-battery: constify power-supply property array Sebastian Reichel
2020-05-13 18:56 ` [PATCHv1 19/19] dt-bindings: power: sbs-battery: Convert to yaml Sebastian Reichel
2020-05-28  2:40   ` Rob Herring
2020-05-28 22:44 ` [PATCHv1 00/19] Improve SBS battery support Sebastian Reichel
2020-05-29 16:27 ` Pavel Machek
2020-06-01 21:57   ` Sebastian Reichel
     [not found] ` <CGME20200601104027eucas1p2b076ee860520d709e8178c41550653f7@eucas1p2.samsung.com>
2020-06-01 10:40   ` Marek Szyprowski
2020-06-01 17:05     ` Sebastian Reichel
2020-06-02  7:17       ` Marek Szyprowski
2020-06-02 18:01         ` Sebastian Reichel
2020-06-03 18:49           ` Marek Szyprowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.