* [PATCH 00/10] Add sysfs entry for system load control
@ 2026-06-29 15:44 Waqar Hameed
2026-06-29 15:44 ` [PATCH 02/10] selftests: power_supply: Add tests for load_switch ABI Waqar Hameed
0 siblings, 1 reply; 2+ messages in thread
From: Waqar Hameed @ 2026-06-29 15:44 UTC (permalink / raw)
To: Sebastian Reichel, Shuah Khan
Cc: kernel, linux-pm, linux-kernel, linux-kselftest
During discussions of the development of a new driver [1], it was
concluded that a new `sysfs` ABI for controlling the connection from
power to system load is wanted (often called BATFET). This patchset
introduces such one.
There are already several drivers that are controlling this, but with
their own custom `sysfs` entries. The drivers in this patchset were find
with a simple `grep` for `bat\s?fet` (there might be more?), and then
converted to use this new `sysfs` ABI. The old custom ABIs are left
untouched of course, for backward compatibility.
[1] https://lore.kernel.org/lkml/cover.1772201049.git.waqar.hameed@axis.com/
Waqar Hameed (10):
power: supply: Add sysfs entry for system load control
selftests: power_supply: Add tests for load_switch ABI
power: supply: ltc4162-l: Use POWER_SUPPLY_PROP_LOAD_SWITCH
power: supply: rt9471: Remove superfluous unpacking of propval
power: supply: rt9471: Use POWER_SUPPLY_PROP_LOAD_SWITCH
power: supply: rt9467: Use POWER_SUPPLY_PROP_LOAD_SWITCH
power: supply: bq24257: Use POWER_SUPPLY_PROP_LOAD_SWITCH
power: supply: bq24190: Remove unused watchdog struct field
power: supply: bq24190: Disable watchdog with bq24190_write_mask()
power: supply: bq24190: Use POWER_SUPPLY_PROP_LOAD_SWITCH
Documentation/ABI/testing/sysfs-class-power | 24 +++++
.../ABI/testing/sysfs-class-power-ltc4162l | 2 +
.../ABI/testing/sysfs-class-power-rt9467 | 2 +
.../ABI/testing/sysfs-class-power-rt9471 | 2 +
drivers/power/supply/bq24190_charger.c | 74 +++++++++++--
drivers/power/supply/bq24257_charger.c | 41 ++++++-
drivers/power/supply/ltc4162-l-charger.c | 54 ++++++++--
drivers/power/supply/power_supply_sysfs.c | 9 ++
drivers/power/supply/rt9467-charger.c | 52 +++++++--
drivers/power/supply/rt9471.c | 101 +++++++++++++-----
include/linux/power_supply.h | 9 ++
.../test_power_supply_properties.sh | 2 +
12 files changed, 322 insertions(+), 50 deletions(-)
base-commit: ab9de95c9cf952332ab79453b4b5d1bfca8e514f
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 02/10] selftests: power_supply: Add tests for load_switch ABI
2026-06-29 15:44 [PATCH 00/10] Add sysfs entry for system load control Waqar Hameed
@ 2026-06-29 15:44 ` Waqar Hameed
0 siblings, 0 replies; 2+ messages in thread
From: Waqar Hameed @ 2026-06-29 15:44 UTC (permalink / raw)
To: Sebastian Reichel, Shuah Khan
Cc: kernel, linux-pm, linux-kselftest, linux-kernel
Test the different valid values for the property.
Signed-off-by: Waqar Hameed <waqar.hameed@axis.com>
---
.../selftests/power_supply/test_power_supply_properties.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/testing/selftests/power_supply/test_power_supply_properties.sh b/tools/testing/selftests/power_supply/test_power_supply_properties.sh
index a66b1313ed882..d3a546f95ae67 100755
--- a/tools/testing/selftests/power_supply/test_power_supply_properties.sh
+++ b/tools/testing/selftests/power_supply/test_power_supply_properties.sh
@@ -80,6 +80,8 @@ for DEVNAME in $supplies; do
test_sysfs_prop_optional_list scope "Unknown","System","Device"
+ test_sysfs_prop_optional_list load_switch "Unknown","On","Off","Standby","Ship"
+
test_sysfs_prop_optional input_current_limit "uA"
test_sysfs_prop_optional input_voltage_limit "uV"
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-06-29 15:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-29 15:44 [PATCH 00/10] Add sysfs entry for system load control Waqar Hameed
2026-06-29 15:44 ` [PATCH 02/10] selftests: power_supply: Add tests for load_switch ABI Waqar Hameed
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox