Re: [ibm-acpi-devel] [PATCH v2] thinkad_acpi: Support the battery wear control

2017-12-07 Thread Christoph Böhmwalder
On Sun, Dec 03, 2017 at 11:56:40PM +0100, Ognjen Galic wrote: > Add support for the ACPI batteries on newer thinkpad models > (>Sandy Bridge) that support the setting of start and stop > thresholds. > > The actual interface to the driver is a extension for the > existing ACPI battery driver. This

[ibm-acpi-devel] Thinkpad X1 5th generation events

2017-12-07 Thread Benoît
Hi, I keep receiving kernel events: (about every 10-30sec) Dec 7 21:19:16 x1 kernel: [42797.016858] thinkpad_acpi: unhandled HKEY event 0x60b0 Dec 7 21:19:16 x1 kernel: [42797.016860] thinkpad_acpi: please report the conditions when this event happened to ibm-acpi-devel@lists.sourceforge.net

Re: [ibm-acpi-devel] [PATCH 2/3] battery: Add the ThinkPad "Not Charging" quirk

2017-12-07 Thread Christoph Böhmwalder
On Wed, Dec 06, 2017 at 11:53:01PM +0100, Ognjen Galic wrote: > The EC/ACPI firmware on Lenovo ThinkPads used to report a status > of "Unknown" when the battery is between the charge start and > charge stop thresholds. On Windows, it reports "Not Charging" > so the quirk has been added to also repo

Re: [ibm-acpi-devel] [PATCH v2] thinkpad_acpi: Support the battery wear control

2017-12-07 Thread Ognjen Galic
On Mon, Dec 04, 2017 at 03:53:32PM +0100, Rafael J. Wysocki wrote: > Not really. > > This is generic code, so no thinkpad_acpi-specific stuff in this file, please, > even under #ifdefs. > I have some ideas, and I want your confirmation if that would be acceptable. Can I do this: Expose a new

[ibm-acpi-devel] [PATCH 2/3] battery: Add the ThinkPad "Not Charging" quirk

2017-12-07 Thread Ognjen Galic
The EC/ACPI firmware on Lenovo ThinkPads used to report a status of "Unknown" when the battery is between the charge start and charge stop thresholds. On Windows, it reports "Not Charging" so the quirk has been added to also report correctly. Now the "status" attribute returns "Not Charging" when

[ibm-acpi-devel] [PATCH] thinkad_acpi: Support the battery wear control

2017-12-07 Thread Ognjen Galic
Add support for the ACPI batteries on newer thinkpad models (>Sandy Bridge) that support the setting of start and stop thresholds. The actual interface to the driver is a extension for the existing ACPI battery driver. This was done so that users can write transparently to the interface of the ACP

[ibm-acpi-devel] [PATCH 0/1] Use checkpatch.pl to make thinkpad_acpi.c error free: octal permissions

2017-12-07 Thread Simranjit Singh
From: Simranjit Singh Using the checkpatch.pl script, there were 8 errors in thinkpad_acpi.c. I fixed them by changing permissions to octal, and by adding parenthesis. On the current tree, if you use checkpatch.pl, thinkpad_acpi.c will have 8 errors. With my changes, there are 0 errors. Howeve

Re: [ibm-acpi-devel] [PATCH v2] thinkad_acpi: Support the battery wear control

2017-12-07 Thread Rafael J. Wysocki
On Sunday, December 3, 2017 11:56:40 PM CET Ognjen Galic wrote: > Add support for the ACPI batteries on newer thinkpad models > (>Sandy Bridge) that support the setting of start and stop > thresholds. > > The actual interface to the driver is a extension for the > existing ACPI battery driver. Thi

[ibm-acpi-devel] [PATCH v2] thinkad_acpi: Support the battery wear control

2017-12-07 Thread Ognjen Galic
Add support for the ACPI batteries on newer thinkpad models (>Sandy Bridge) that support the setting of start and stop thresholds. The actual interface to the driver is a extension for the existing ACPI battery driver. This was done so that users can write transparently to the interface of the ACP

[ibm-acpi-devel] [PATCH 3/3] thinkpad_acpi: Add support for battery thresholds

2017-12-07 Thread Ognjen Galic
This patch uses the new battery hooking API to add support for the ACPI battery wear control present in Lenovo ThinkPads that have >=SandyBridge processors. thinkpad_acpi registers two new attributes for each battery: 1) Charge start threshold /sys/class/power_supply/BATN/charge_start_threshold

Re: [ibm-acpi-devel] [PATCH 0/1] Use checkpatch.pl to make thinkpad_acpi.c error free: octal permissions

2017-12-07 Thread Randy Dunlap
On 11/14/2017 03:14 PM, Simranjit Singh wrote: > From: Simranjit Singh > > Using the checkpatch.pl script, there were 8 errors in thinkpad_acpi.c. I > fixed them by changing permissions to octal, > and by adding parenthesis. > On the current tree, if you use checkpatch.pl, thinkpad_acpi.c will

[ibm-acpi-devel] [PATCH 1/1] Use checkpatch.pl to make thinkpad_acpi.c error free: add parenthesis to complex macros

2017-12-07 Thread Simranjit Singh
From: Simranjit Singh Added parentheses around complex macros following checkpatch.pl for thinkpad_acpi.c Signed-off-by: Simranjit Singh --- diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 9ad1f5b..e2616c2 100644 --- a/drivers/platform/x86/th

[ibm-acpi-devel] [PATCH 1/3] battery: Add the battery hooking API

2017-12-07 Thread Ognjen Galic
This is a patch that implements a generic hooking API for the generic ACPI battery driver. With this new generic API, drivers can expose platform specific behaviour via sysfs attributes in /sys/class/power_supply/BATn/ in a generic way. A perfect example of the need for this API are Lenovo ThinkP