Skip to contentSkip to conversation

docs: ABI: sysfs-class-power: Documented cycle_count property

PATCH In review Hans de Goede 2 participants 2 messages Sep 16, 2021 – Sep 27, 2021 Power supply

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 docs: ABI: sysfs-class-power: Documented cycle_count property

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.

---
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(+)
Documentation/ABI/testing/sysfs-class-power +13 -0
index ca830c6cd809..f7904efc4cfa 100644
@@ -480,6 +480,19 @@ Description:
 
 		Valid values: Represented in microvolts
 
+What:		/sys/class/power_supply/<supply_name>/cycle_count
+Date:		January 2010
+Contact:	[email protected]
+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
Signature · 1 line
2.31.1
#1 lore raw

Hi,

Quoted 14 lines · Hans de Goede

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.

---
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

Quoted 6 lines

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

Quoted 30 lines
 Documentation/ABI/testing/sysfs-class-power | 13 +++++++++++++
 1 file changed, 13 insertions(+)
Documentation/ABI/testing/sysfs-class-power +13 -0
index ca830c6cd809..f7904efc4cfa 100644
@@ -480,6 +480,19 @@ Description:
 
 		Valid values: Represented in microvolts
 
+What:		/sys/class/power_supply/<supply_name>/cycle_count
+Date:		January 2010
+Contact:	[email protected]
+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
Signature · 1 line
2.31.1