All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] docs: ABI: sysfs-class-power: Documented cycle_coint property
@ 2021-09-13 12:09 Hans de Goede
  2021-09-13 13:11 ` Bastien Nocera
  0 siblings, 1 reply; 3+ messages in thread
From: Hans de Goede @ 2021-09-13 12:09 UTC (permalink / raw)
  To: Sebastian Reichel; +Cc: Hans de Goede, linux-pm, Bastien Nocera

Commit c955fe8e0bdd ("POWER: Add support for cycle_count") added a
POWER_SUPPLY_PROP_CYCLE_COUNT "cycle_count" property to the set of
standard power-supply properties, but this was never documented,
document it now.

Link: https://gitlab.freedesktop.org/upower/upower/-/issues/152
Reported-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 Documentation/ABI/testing/sysfs-class-power | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/Documentation/ABI/testing/sysfs-class-power b/Documentation/ABI/testing/sysfs-class-power
index ca830c6cd809..643637c6bb58 100644
--- a/Documentation/ABI/testing/sysfs-class-power
+++ b/Documentation/ABI/testing/sysfs-class-power
@@ -480,6 +480,17 @@ Description:
 
 		Valid values: Represented in microvolts
 
+What:		/sys/class/power_supply/<supply_name>/cycle_count
+Date:		January 2010
+Contact:	linux-pm@vger.kernel.org
+Description:
+		Reports the number of full charge + discharge cycles the
+		battery has undergone.
+
+		Access: Read
+
+		Valid values: Possitive integer representing full cycles
+
 **USB Properties**
 
 What:		/sys/class/power_supply/<supply_name>/input_current_limit
-- 
2.31.1


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

* Re: [PATCH] docs: ABI: sysfs-class-power: Documented cycle_coint property
  2021-09-13 12:09 [PATCH] docs: ABI: sysfs-class-power: Documented cycle_coint property Hans de Goede
@ 2021-09-13 13:11 ` Bastien Nocera
  2021-09-13 13:26   ` Hans de Goede
  0 siblings, 1 reply; 3+ messages in thread
From: Bastien Nocera @ 2021-09-13 13:11 UTC (permalink / raw)
  To: Hans de Goede, Sebastian Reichel; +Cc: linux-pm

On Mon, 2021-09-13 at 14:09 +0200, Hans de Goede wrote:
> Commit c955fe8e0bdd ("POWER: Add support for cycle_count") added a
> POWER_SUPPLY_PROP_CYCLE_COUNT "cycle_count" property to the set of
> standard power-supply properties, but this was never documented,
> document it now.

Thanks very much Hans.

There's a typo in the subject line, and I had a couple of comments.

> Link: https://gitlab.freedesktop.org/upower/upower/-/issues/152
> Reported-by: Bastien Nocera <hadess@hadess.net>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  Documentation/ABI/testing/sysfs-class-power | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/Documentation/ABI/testing/sysfs-class-power
> b/Documentation/ABI/testing/sysfs-class-power
> index ca830c6cd809..643637c6bb58 100644
> --- a/Documentation/ABI/testing/sysfs-class-power
> +++ b/Documentation/ABI/testing/sysfs-class-power
> @@ -480,6 +480,17 @@ Description:
>  
>                 Valid values: Represented in microvolts
>  
> +What:          /sys/class/power_supply/<supply_name>/cycle_count
> +Date:          January 2010
> +Contact:       linux-pm@vger.kernel.org
> +Description:
> +               Reports the number of full charge + discharge cycles
> the
> +               battery has undergone.

What happens if a device doesn't report cycle_count, the property just
doesn't exist?

> +
> +               Access: Read
> +
> +               Valid values: Possitive integer representing full
> cycles

positive

> +
>  **USB Properties**
>  
>  What:          /sys/class/power_supply/<supply_name>/input_current_l
> imit



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

* Re: [PATCH] docs: ABI: sysfs-class-power: Documented cycle_coint property
  2021-09-13 13:11 ` Bastien Nocera
@ 2021-09-13 13:26   ` Hans de Goede
  0 siblings, 0 replies; 3+ messages in thread
From: Hans de Goede @ 2021-09-13 13:26 UTC (permalink / raw)
  To: Bastien Nocera, Sebastian Reichel; +Cc: linux-pm

Hi,

On 9/13/21 3:11 PM, Bastien Nocera wrote:
> On Mon, 2021-09-13 at 14:09 +0200, Hans de Goede wrote:
>> Commit c955fe8e0bdd ("POWER: Add support for cycle_count") added a
>> POWER_SUPPLY_PROP_CYCLE_COUNT "cycle_count" property to the set of
>> standard power-supply properties, but this was never documented,
>> document it now.
> 
> Thanks very much Hans.
> 
> There's a typo in the subject line, and I had a couple of comments.

Ugh, I already send a v2 to address the positive spelling error,
well guess I'll do a v3 now then :)

> 
>> Link: https://gitlab.freedesktop.org/upower/upower/-/issues/152
>> Reported-by: Bastien Nocera <hadess@hadess.net>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> ---
>>  Documentation/ABI/testing/sysfs-class-power | 11 +++++++++++
>>  1 file changed, 11 insertions(+)
>>
>> diff --git a/Documentation/ABI/testing/sysfs-class-power
>> b/Documentation/ABI/testing/sysfs-class-power
>> index ca830c6cd809..643637c6bb58 100644
>> --- a/Documentation/ABI/testing/sysfs-class-power
>> +++ b/Documentation/ABI/testing/sysfs-class-power
>> @@ -480,6 +480,17 @@ Description:
>>  
>>                 Valid values: Represented in microvolts
>>  
>> +What:          /sys/class/power_supply/<supply_name>/cycle_count
>> +Date:          January 2010
>> +Contact:       linux-pm@vger.kernel.org
>> +Description:
>> +               Reports the number of full charge + discharge cycles
>> the
>> +               battery has undergone.
> 
> What happens if a device doesn't report cycle_count, the property just
> doesn't exist?

Right, that is how all these properties work, if something is not
reported by the battery the property is not there.

> 
>> +
>> +               Access: Read
>> +
>> +               Valid values: Possitive integer representing full
>> cycles
> 
> positive

Ack, already fixed in v2.

Regards,

Hans


> 
>> +
>>  **USB Properties**
>>  
>>  What:          /sys/class/power_supply/<supply_name>/input_current_l
>> imit
> 
> 


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

end of thread, other threads:[~2021-09-13 13:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-13 12:09 [PATCH] docs: ABI: sysfs-class-power: Documented cycle_coint property Hans de Goede
2021-09-13 13:11 ` Bastien Nocera
2021-09-13 13:26   ` Hans de Goede

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.