From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Locke Subject: Re: [PATCH 2/3] thinkpad_acpi: add support for force_discharge Date: Mon, 21 May 2018 07:31:12 -0600 Message-ID: <20180521133112.GA4578@kevinolos> References: <20180513153000.GA5117@thinkpad> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20180513153000.GA5117@thinkpad> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ibm-acpi-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Ognjen Galic Cc: Platform Driver , "Rafael J. Wysocki" , Henrique de Moraes Holschuh , Linux PM , "Rafael J. Wysocki" , Robert Moore , Sebastian Reichel , ACPI Devel Maling List , Andy Shevchenko , Christoph =?iso-8859-1?Q?B=F6hmwalder?= , Darren Hart , devel-E0kO6a4B6psdnm+yROfE0A@public.gmane.org, ibm-acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Andy Shevchenko , Len Brown List-Id: linux-pm@vger.kernel.org On Sun, 2018-05-13 at 17:30 +0200, Ognjen Galic wrote: > Lenovo ThinkPad systems have a feature that lets you > force the battery to discharge regardless if AC is attached > or not. > > This patch implements that feature and exposes it via the generic > ACPI battery driver. On a T430 (2342-CTO) I can confirm that both force_discharge and inhibit_charge behave as expected, both when the battery is above and below charge_start_threshold. Input validation also works as-expected. The only oddity I noticed is that force_discharge has a delay taking effect (<1 sec) transitioning from 0 to 1 (but not 1 to 0). Tested-by: Kevin Locke Thanks for working on this! Kevin ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot