diff mbox series

[v4] docs: ABI: sysfs-class-power: Documented cycle_count property

Message ID 20210916125321.10823-1-hdegoede@redhat.com (mailing list archive)
State Not Applicable, archived
Headers show
Series [v4] docs: ABI: sysfs-class-power: Documented cycle_count property | expand

Commit Message

Hans de Goede Sept. 16, 2021, 12:53 p.m. UTC
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>
---
Changes in v4:
- Document that some drivers, such as e.g. the often used
  drivers/acpi/battery.c driver may return 0 when cycle_count information
  is not available

Changes in v3 (aka the really really typo free version)
- Fix typo in "cycle_count" in Subject

Changes in v2:
- s/Possitive/Positive/
---
 Documentation/ABI/testing/sysfs-class-power | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Sebastian Reichel Sept. 27, 2021, 12:39 p.m. UTC | #1
Hi,

On Thu, Sep 16, 2021 at 02:53:21PM +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.
> 
> 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>
> ---
> Changes in v4:
> - Document that some drivers, such as e.g. the often used
>   drivers/acpi/battery.c driver may return 0 when cycle_count information
>   is not available
> 
> Changes in v3 (aka the really really typo free version)
> - Fix typo in "cycle_count" in Subject
> 
> Changes in v2:
> - s/Possitive/Positive/
> ---

Thanks, queued.

-- Sebastian

>  Documentation/ABI/testing/sysfs-class-power | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/Documentation/ABI/testing/sysfs-class-power b/Documentation/ABI/testing/sysfs-class-power
> index ca830c6cd809..f7904efc4cfa 100644
> --- a/Documentation/ABI/testing/sysfs-class-power
> +++ b/Documentation/ABI/testing/sysfs-class-power
> @@ -480,6 +480,19 @@ 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:
> +			Integer > 0: representing full cycles
> +			Integer = 0: cycle_count info is not available
> +
>  **USB Properties**
>  
>  What:		/sys/class/power_supply/<supply_name>/input_current_limit
> -- 
> 2.31.1
>
diff mbox series

Patch

diff --git a/Documentation/ABI/testing/sysfs-class-power b/Documentation/ABI/testing/sysfs-class-power
index ca830c6cd809..f7904efc4cfa 100644
--- a/Documentation/ABI/testing/sysfs-class-power
+++ b/Documentation/ABI/testing/sysfs-class-power
@@ -480,6 +480,19 @@  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:
+			Integer > 0: representing full cycles
+			Integer = 0: cycle_count info is not available
+
 **USB Properties**
 
 What:		/sys/class/power_supply/<supply_name>/input_current_limit