[ibm-acpi-devel] [PATCH v2 1/2] platform/x86: thinkpad_acpi: Proper model/release matching

2018-08-01 Thread Jouke Witteveen
Modern Thinkpads have three character model designators. Previously, they would be accepted, but recorded incompletely. Revision matching extracted the wrong bytes from the ID string. This made the use of quirks for modern machines impossible. Fixes: 1b0eb5bc2413 Signed-off-by: Jouke Witteveen --

[ibm-acpi-devel] [PATCH v2 2/2] platform/x86: thinkpad_acpi: Support battery quirk

2018-08-01 Thread Jouke Witteveen
Some Thinkpads have a single battery, but expose it as BAT1. Use the quirks engine to force these machines into always addressing the primary battery. Without this, the battery name would resolve to the non-existent secondary battery and ACPI calls would fail. Signed-off-by: Jouke Witteveen ---

Re: [ibm-acpi-devel] [PATCH v2 1/2] platform/x86: thinkpad_acpi: Proper model/release matching

2018-08-01 Thread Andy Shevchenko
On Wed, Aug 1, 2018 at 12:22 PM, Jouke Witteveen wrote: > Modern Thinkpads have three character model designators. Previously, they > would be accepted, but recorded incompletely. Revision matching extracted > the wrong bytes from the ID string. This made the use of quirks for modern > machines im

Re: [ibm-acpi-devel] [PATCH] thinkpad_acpi: don't overwrite supported battery operations

2018-08-01 Thread Henrique de Moraes Holschuh
On Mon, 30 Jul 2018, Thomas Weißschuh wrote: > On Sat, 2018-06-16T11:39+0200, Thomas Weißschuh wrote: > > Previously the struct containing the supported operations for all > > batteries was zeroed every time a battery was probed. > > This prevented all batteries except the lastly probed one from be

Re: [ibm-acpi-devel] [PATCH v2 1/2] platform/x86: thinkpad_acpi: Proper model/release matching

2018-08-01 Thread Henrique de Moraes Holschuh
On Wed, 01 Aug 2018, Jouke Witteveen wrote: > Modern Thinkpads have three character model designators. Previously, they > would be accepted, but recorded incompletely. Revision matching extracted > the wrong bytes from the ID string. This made the use of quirks for modern > machines impossible. >

Re: [ibm-acpi-devel] [PATCH v2 2/2] platform/x86: thinkpad_acpi: Support battery quirk

2018-08-01 Thread Henrique de Moraes Holschuh
On Wed, 01 Aug 2018, Jouke Witteveen wrote: > Some Thinkpads have a single battery, but expose it as BAT1. Use the quirks > engine to force these machines into always addressing the primary battery. > Without this, the battery name would resolve to the non-existent secondary > battery and ACPI call

[ibm-acpi-devel] [PATCH] platform/x86: thinkpad_acpi: Extend battery quirk coverage

2018-08-01 Thread Jouke Witteveen
Based on bug reports and a web search for "Thinkpad_acpi: Error probing battery 2" four more models were found that require the battery quirk: Lenovo B5400, Thinkpad 11e (original and gen 3), Thinkpad 13 gen 3. Signed-off-by: Jouke Witteveen --- I could only get someone to verify this on the

Re: [ibm-acpi-devel] [PATCH] platform/x86: thinkpad_acpi: Extend battery quirk coverage

2018-08-01 Thread Andy Shevchenko
On Wed, Aug 1, 2018 at 5:32 PM, Jouke Witteveen wrote: > Based on bug reports and a web search for > "Thinkpad_acpi: Error probing battery 2" > four more models were found that require the battery quirk: > Lenovo B5400, Thinkpad 11e (original and gen 3), Thinkpad 13 gen 3. I think you may add

Re: [ibm-acpi-devel] [PATCH] platform/x86: thinkpad_acpi: Extend battery quirk coverage

2018-08-01 Thread Henrique de Moraes Holschuh
On Wed, 01 Aug 2018, Andy Shevchenko wrote: > On Wed, Aug 1, 2018 at 5:32 PM, Jouke Witteveen wrote: > > Based on bug reports and a web search for > > "Thinkpad_acpi: Error probing battery 2" > > four more models were found that require the battery quirk: > > Lenovo B5400, Thinkpad 11e (origin

[ibm-acpi-devel] [PATCH] platform/x86: thinkpad_acpi: Fix multi-battery bug

2018-08-01 Thread Thomas Weißschuh
The struct containing the supported operations for all batteries is being zeroed on each battery probe. This prevents all other batteries except the lastly probed one from being configured. --- drivers/platform/x86/thinkpad_acpi.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff -

[ibm-acpi-devel] [PATCH v2] platform/x86: thinkpad_acpi: Fix multi-battery bug

2018-08-01 Thread Thomas Weißschuh
The struct containing the supported operations for all batteries is being zeroed on each battery probe. This prevents all other batteries except the lastly probed one from being configured. Signed-off-by: Thomas Weißschuh --- Changes since v1: * Missing sign-off added drivers/platform/x86/th