mbox series

[v2,0/1] power: supply: support charge_types in the extensions API

Message ID 20250414131840.382756-1-jvanderwaa@redhat.com
Headers show
Series power: supply: support charge_types in the extensions API | expand

Message

Jelle van der Waa April 14, 2025, 1:18 p.m. UTC
The goal of this patch is to make it possible for the ideapad-laptop
driver to move from its custom conservation_mode sysfs attribute to the
standardised charge_types sysfs attribute with a power_supply extension.
Along with other laptop models which support an end charge threshold
which limits it to a fixed value such as some Toshiba and LG models.

User space, in this case UPower would then be detect 'Long Life' as
charge_types option and set it.

This patch should also allow the "dell-laptop" driver to move over to
the extensions API.

Jelle van der Waa (1):
  power: supply: support charge_types in extensions

 drivers/power/supply/power_supply_sysfs.c | 23 ++++++++++++++++++++++-
 drivers/power/supply/test_power.c         | 20 ++++++++++++++++++--
 include/linux/power_supply.h              |  1 +
 3 files changed, 41 insertions(+), 3 deletions(-)