From 420a1e2763b5df3ed90f92d97cf30fe43822bba8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ezequiel=20Rodriguez?= Date: Mon, 31 Aug 2026 12:53:37 -0300 Subject: [PATCH] docs: power: supply: fix power_supply_class.rst status, health and time_to MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Correct STATUS/HEALTH references to POWER_SUPPLY_* enums in include/linux/power_supply.h instead of the nonexistent battery.h macros. Document TIME_TO_{EMPTY,FULL}_{NOW,AVG}, fix the "operatable" typo, and note that MODEL_NAME and MANUFACTURER already exist. Signed-off-by: Iván Ezequiel Rodriguez Link: https://patch.msgid.link/20260831155339.181487-4-ivanrwcm25@gmail.com Signed-off-by: Sebastian Reichel --- Documentation/power/power_supply_class.rst | 23 +++++++++++----------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/Documentation/power/power_supply_class.rst b/Documentation/power/power_supply_class.rst index 6d11f8c594a0..0072b41d4d45 100644 --- a/Documentation/power/power_supply_class.rst +++ b/Documentation/power/power_supply_class.rst @@ -82,7 +82,8 @@ _NOW STATUS this attribute represents operating status (charging, full, discharging (i.e., powering a load), etc.). This corresponds to - `BATTERY_STATUS_*` values, as defined in battery.h. + `POWER_SUPPLY_STATUS_*` values, as defined in + include/linux/power_supply.h. CHARGE_TYPE batteries can typically charge at different rates. @@ -95,8 +96,8 @@ AUTHENTIC to the platform is authentic(1) or non-authentic(0). HEALTH - represents health of the battery. Values corresponds to - POWER_SUPPLY_HEALTH_*, defined in battery.h. + represents health of the battery. Values correspond to + POWER_SUPPLY_HEALTH_*, defined in include/linux/power_supply.h. VOLTAGE_OCV open circuit voltage of the battery. @@ -202,16 +203,17 @@ TEMP_AMBIENT_ALERT_MIN TEMP_AMBIENT_ALERT_MAX maximum ambient temperature alert. TEMP_MIN - minimum operatable temperature + minimum operable temperature TEMP_MAX - maximum operatable temperature + maximum operable temperature -TIME_TO_EMPTY +TIME_TO_EMPTY_NOW, TIME_TO_EMPTY_AVG seconds left for battery to be considered empty - (i.e., while battery powers a load) -TIME_TO_FULL + (i.e., while battery powers a load). *_NOW is a + momentary reading; *_AVG is averaged over a fixed period. +TIME_TO_FULL_NOW, TIME_TO_FULL_AVG seconds left for battery to be considered full - (i.e., while battery is charging) + (i.e., while battery is charging). Same now/avg distinction. Battery <-> external power supply interaction @@ -253,9 +255,6 @@ A: The attributes available currently are the ones currently provided by the drivers written. - Good candidates to add in future: model/part#, cycle_time, manufacturer, - etc. - Q: I have some very specific attribute (e.g., battery color). Should I add