]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86: asus-wmi: Support laptops where the first battery is named BATT
authorKristian Klausen <kristian@klausen.dk>
Tue, 3 Mar 2020 18:02:15 +0000 (19:02 +0100)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 20 Mar 2020 12:44:46 +0000 (14:44 +0200)
commit254795f566912de247c24bdee0c1f06e832803eb
tree07b02cc910571c867ae1eb291cfa22c569049bc6
parent0defd31076398bbfcdad251c1cffec2ba6a2b318
platform/x86: asus-wmi: Support laptops where the first battery is named BATT

The WMI method to set the charge threshold does not provide a
way to specific a battery, so we assume it is the first/primary
battery (by checking if the name is BAT0).
On some newer ASUS laptops (Zenbook UM431DA) though, the
primary/first battery isn't named BAT0 but BATT, so we need
to support that case.

Fixes: 31c20a88ccc4 ("platform/x86: asus-wmi: Refactor charge threshold to use the battery hooking API")
Cc: stable@vger.kernel.org
Signed-off-by: Kristian Klausen <kristian@klausen.dk>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/asus-wmi.c