From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ognjen =?utf-8?B?R2FsacSH?= Subject: Re: [PATCH 3/3] thinkpad_acpi: document the battery controls Date: Mon, 14 May 2018 15:41:18 +0200 Message-ID: <20180514134118.GD6417@thinkpad> References: <20180513153024.GA5142@thinkpad> <20180514120302.knhohskga6x6ji3s@khazad-dum.debian.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20180514120302.knhohskga6x6ji3s-ZGHd14iZgfaRjzvQDGKj+xxZW9W5cXbT@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ibm-acpi-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Henrique de Moraes Holschuh 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?= , Kevin Locke , Darren Hart , devel-E0kO6a4B6psdnm+yROfE0A@public.gmane.org, ibm-acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Andy Shevchenko , Len Brown List-Id: platform-driver-x86.vger.kernel.org On Mon, May 14, 2018 at 09:03:02AM -0300, Henrique de Moraes Holschuh wrote: > On Sun, 13 May 2018, Ognjen Galic wrote: > > +Battery force discharging > > +-------------------------- > > + > > +There is also support for AC overriding. This means that you can force the battery to discharge > > +even when AC is attached. This is also exposed via the generic ACPI driver: > > + > > +/sys/class/power_supply/BATx/force_discharge [int, 1, 0] > > + > > +Setting it to 1 forces the battery to discharge on AC. > > This is used to run a battery "fuel gauge" callibration cycle. > > One has to set the limits to 0,100 (i.e. disable the anti-wear > limiters), trigger a force_discharge, and wait until it discharges to > zero. At that point, the EC is supposed to reset the force_discharge > bit by itself, and then you have to wait the battery to charge back to > full. That's the intended use case for this patches via an upcoming program I am writing for userspace. > > (and at least on older thinkpads, where you had to use SMAPI to do the > above, it didn't need much help from the operating system. Once a > couple years you could just set force_discharge on both batteries (with > the thing connected to AC), shutdown the operating system, and go to > sleep. By morning, it would be fully charged and both gauges > calibrated, still powered off, ready to go :P ). > > -- > Henrique Holschuh ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot