Re: [PATCH 01/10] power: supply: Add sysfs entry for system load control
Waqar Hameed <[email protected]>
| Newsgroups | org.kernel.vger.linux-pm,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Jul 22, 2026 at 03:25 +0200 Sebastian Reichel <[email protected]> wrote: > Hi, > > On Wed, Jul 01, 2026 at 11:23:02AM +0200, Waqar Hameed wrote: >> On Mon, Jun 29, 2026 at 17:44 +0200 Waqar Hameed <[email protected]> wrote: >> >> [...] >> >> > diff --git a/Documentation/ABI/testing/sysfs-class-power b/Documentation/ABI/testing/sysfs-class-power >> > index 32697b926cc8c..2287b207311cd 100644 >> > --- a/Documentation/ABI/testing/sysfs-class-power >> > +++ b/Documentation/ABI/testing/sysfs-class-power >> > @@ -590,6 +590,30 @@ Description: >> > >> > Valid values: 0 - 100 (percent) >> > >> > +What: /sys/class/power_supply/<supply_name>/load_switch >> > +Date: June 2026 >> > +Contact: [email protected] >> > +Description: >> > + Devices can control the connection from power to system load. >> > + For example, with a field-effect transistor between a battery >> > + and the system load (BATFET). This entry controls such switch. >> > + The obvious states are "on" and "off", i.e. there is a >> > + connection or not, respectively. However, many devices can also >> > + enter special modes such as "low-power", "shipping" or "deep >> > + sleep". In these modes the switch is usually off and the >> > + quiescent current quite low. >> > + >> > + Access: Read, Write >> > + >> > + Valid values: >> > + >> > + ============= ================================== >> > + "On" (1) Power is connected to the load. >> > + "Off" (2) Power is disconnected to the load. >> > + "Standby" (3) Low-power mode. >> > + "Ship" (4) Ship mode. >> > + ============= ================================== >> >> `"Unknown" (0)` needs to be added here as well... > > I see the issue, that userspace has no idea, which values are > supported by a specific device. I think it's better to follow > the same style, that is already used for e.g. charge_types, so > that the file reads something like this: > > [On] Standby Ship > > E.g. provide all supported values for the specific device and > mark the current value with square brackets. Alright, let's do that then. > > P.S.: I've applied the unrelated cleanup patches from this series. Thanks, I'll make sure to rebase then. Will send soon after the vacation period (a month).