From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ognjen =?utf-8?B?R2FsacSH?= Subject: Re: [PATCH v13 3/4] thinkpad_acpi: Add support for battery thresholds Date: Sat, 10 Feb 2018 09:48:59 +0100 Message-ID: <20180210084859.dtpydh5gkvoywoju@thinkpad> References: <20180207145844.bd567c36juvlkjvz@thinkpad> <20180208220323.cr6j2kcozekwbzo6@earth.universe> <20180209103946.fkolldv6boml3e32@earth.universe> <20180209123414.xrtmtgmeeezmma5u@earth.universe> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20180209123414.xrtmtgmeeezmma5u@earth.universe> Sender: platform-driver-x86-owner@vger.kernel.org To: Sebastian Reichel Cc: "Rafael J. Wysocki" , Andy Shevchenko , Len Brown , Robert Moore , Lv Zheng , ACPI Devel Maling List , devel@acpica.org, Darren Hart , Andy Shevchenko , Henrique de Moraes Holschuh , Platform Driver , ibm-acpi-devel@lists.sourceforge.net, Linux PM , Christoph =?iso-8859-1?Q?B=F6hmwalder?= , Kevin Locke List-Id: linux-pm@vger.kernel.org On Fri, Feb 09, 2018 at 01:34:14PM +0100, Sebastian Reichel wrote: > Hi, > > On Fri, Feb 09, 2018 at 11:49:40AM +0100, Rafael J. Wysocki wrote: > > On Fri, Feb 9, 2018 at 11:39 AM, Sebastian Reichel wrote: > > > Hi, > > > > > > On Fri, Feb 09, 2018 at 10:22:54AM +0100, Rafael J. Wysocki wrote: > > >> On Thu, Feb 8, 2018 at 11:03 PM, Sebastian Reichel wrote: > > >> > Hi, > > >> > > > >> > On Wed, Feb 07, 2018 at 03:58:44PM +0100, Ognjen Galic wrote: > > >> >> 1) Charge start threshold > > >> >> /sys/class/power_supply/BATN/charge_start_threshold > > >> >> > > >> >> Valid values are [0, 99]. A value of 0 turns off the > > >> >> start threshold wear control. > > >> >> > > >> >> 2) Charge stop threshold > > >> >> /sys/class/power_supply/BATN/charge_stop_threshold > > >> >> > > >> >> Valid values are [1, 100]. A value of 100 turns off > > >> >> the stop threshold wear control. This must be > > >> >> configured first. > > >> > > > >> > This is a new sysfs file, that should be documented. > > >> > > >> Right, I should have remembered about that, sorry. > > >> > > >> > Also this looks pretty generic. Just introduce new POWER_SUPPLY_PROP_ > > >> > entries for start/stop charging threshold and use them. > > >> > > >> What about doing this as a follow-up? > > > > > > Fine with me. > > > > OK > > > > Actually, I don't see any documentation whatever for ACPI battery and > > AC power supply properties, so I guess that needs to be added in > > general and I don't think it would be fair to ask Ognjen to do that in > > order to get the extension in. > > > > Why don't we pencil this in as work to do? > > The generic ones are documented here: Do you guys want me to send in another revision of the patch with some documentation on the sysfs API? > > Documentation/power/power_supply_class.txt > > -- Sebastian