From patchwork Mon Jul 27 19:23:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 11687433 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 842D3722 for ; Mon, 27 Jul 2020 19:23:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DDC1220729 for ; Mon, 27 Jul 2020 19:23:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=protonmail.com header.i=@protonmail.com header.b="hOejiBXO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727823AbgG0TXT (ORCPT ); Mon, 27 Jul 2020 15:23:19 -0400 Received: from mail-40132.protonmail.ch ([185.70.40.132]:55100 "EHLO mail-40132.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727053AbgG0TXT (ORCPT ); Mon, 27 Jul 2020 15:23:19 -0400 Date: Mon, 27 Jul 2020 19:23:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1595877796; bh=txQvHW4JdGvGulHC+fC1QiKzyGxZwrPeBP5QxLXsNY4=; h=Date:To:From:Reply-To:Subject:From; b=hOejiBXOZMkl2mA4WOxvQYXeRu4NUmaoz7DYh23mK6kZahX4epD26TWFSZFHAHQrH q0ZreteVA8ofeX8Arayw34jfAf+f9GBDX1DkTHMgEexBvb7RFs+O9t59LDPNPhRxGU vf04SLIru5Rp1rb+JlGuYOfEz8D+3QETJPGcc3qY= To: Andy Shevchenko , Platform Driver From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= Reply-To: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= Subject: [PATCH v2] docs/admin-guide/thinkpad-acpi: add section for battery charge control Message-ID: MIME-Version: 1.0 X-Spam-Status: No, score=-1.2 required=7.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mail.protonmail.ch Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org This patch adds a section to the Thinkpad ACPI extras driver documentation detailing the provided features that may be used to modify battery charge related state. As of yet, only charge_control_{start,end}_threshold attributes are supported and documented. Signed-off-by: Barnabás Pőcze --- .../admin-guide/laptops/thinkpad-acpi.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) -- 2.27.0 diff --git a/Documentation/admin-guide/laptops/thinkpad-acpi.rst b/Documentation/admin-guide/laptops/thinkpad-acpi.rst index 822907dcc845..07fc005e96de 100644 --- a/Documentation/admin-guide/laptops/thinkpad-acpi.rst +++ b/Documentation/admin-guide/laptops/thinkpad-acpi.rst @@ -1470,6 +1470,23 @@ For more details about which buttons will appear depending on the mode, please review the laptop's user guide: http://www.lenovo.com/shop/americas/content/user_guides/x1carbon_2_ug_en.pdf +Battery charge control +---------------------- + +sysfs attributes: +/sys/class/power_supply/BAT*/charge_control_{start,end}_threshold + +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. + +The exact semantics of the attributes may be found in +Documentation/ABI/testing/sysfs-class-power. + Multiple Commands, Module Parameters ------------------------------------