Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save linrunner/fd07193578e07f16a5c1c9af3309f0d2 to your computer and use it in GitHub Desktop.
Save linrunner/fd07193578e07f16a5c1c9af3309f0d2 to your computer and use it in GitHub Desktop.
[PATCH 3/3] thinkpad_acpi: document force_discharge and
From d61611e7aaf746760797907ab06bf20305f1c874 Mon Sep 17 00:00:00 2001
From: Thomas Koch <linrunner@gmx.net>
Date: Thu, 25 Jun 2020 17:08:57 +0200
Subject: [PATCH 3/3] thinkpad_acpi: document force_discharge and
inhibit_charge
Describe the additional sysfs attributes for
forced discharging and charge inhibiting.
Improve description of charge_control_{start,end}_threshold.
Signed-off-by: Thomas Koch <linrunner@gmx.net>
---
.../admin-guide/laptops/thinkpad-acpi.rst | 30 +++++++++++++++----
1 file changed, 25 insertions(+), 5 deletions(-)
diff --git a/Documentation/admin-guide/laptops/thinkpad-acpi.rst b/Documentation/admin-guide/laptops/thinkpad-acpi.rst
index 5e477869df18..e71bc74d69dc 100644
--- a/Documentation/admin-guide/laptops/thinkpad-acpi.rst
+++ b/Documentation/admin-guide/laptops/thinkpad-acpi.rst
@@ -1493,15 +1493,35 @@ sysfs attributes:
These two attributes are created for those batteries that are supported by the
driver. They enable the user to control the battery charge thresholds of the
-given battery. Both values may be read and set. `charge_control_start_threshold`
-accepts an integer between 0 and 99 (inclusive); this value represents a battery
-percentage level, below which charging will begin. `charge_control_end_threshold`
-accepts an integer between 1 and 100 (inclusive); this value represents a battery
-percentage level, above which charging will stop.
+given battery. Both values may be read and set.
+
+`charge_control_start_threshold` accepts an integer between 0 and 99 (inclusive).
+This value represents the battery percentage level below which charging will begin.
+
+`charge_control_end_threshold` accepts an integer between 1 and 100 (inclusive).
+This value represents the battery percentage level where charging will stop.
The exact semantics of the attributes may be found in
Documentation/ABI/testing/sysfs-class-power.
+Battery forced discharging
+--------------------------
+
+sysfs attribute:
+/sys/class/power_supply/BATx/force_discharge
+
+Setting this attribute to 1 forces the battery to discharge while AC is attached.
+Setting it to 0 terminates forced discharging.
+
+Battery charge inhibiting
+--------------------------
+
+sysfs attribute:
+/sys/class/power_supply/BATx/inhibit_discharge
+
+Setting this attribute to 1 stops charging of the battery as a manual override
+over the threshold attributes. Setting it to 0 terminates the override.
+
Multiple Commands, Module Parameters
------------------------------------
--
2.25.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment