Skip to content

Commit 5129389

Browse files
committed
HID: lenovo: Use KEY_PERFORMANCE instead of ACPI's platform_profile
Commit 84c9d2a ("HID: lenovo: Support for ThinkPad-X12-TAB-1/2 Kbd Fn keys") added a dependency on ACPI's platform_profile. This should not be done for generic USB devices as this prevents using the devices on non ACPI devices like Apple silicon Macs and other non-ACPI arm64 systems. An attempt to allow using platform_profile on non-ACPI systems was rejected in [1] and instead platform_profile was made to fail during init in commit dd13316 ("ACPI: platform_profile: Avoid initializing on non-ACPI platforms"). So remove the broken dependency and instead let's user space handle this keycode by sending the new KEY_PERFORMANCE. Stable backport depends on commit 89c5214 ("Input: add keycode for performance mode key"). [1]: https://lore.kernel.org/linux-acpi/CAJZ5v0icRdTSToaKbdf=MdRin4NyB2MstUVaQo8VR6-n7DkVMQ@mail.gmail.com/ Cc: [email protected] Cc: [email protected] Fixes: 84c9d2a ("HID: lenovo: Support for ThinkPad-X12-TAB-1/2 Kbd Fn keys") Signed-off-by: Janne Grunau <[email protected]> --- #regzbot introduced: 84c9d2a
1 parent 61ef69c commit 5129389

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

drivers/hid/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -597,8 +597,6 @@ config HID_LED
597597

598598
config HID_LENOVO
599599
tristate "Lenovo / Thinkpad devices"
600-
depends on ACPI
601-
select ACPI_PLATFORM_PROFILE
602600
select NEW_LEDS
603601
select LEDS_CLASS
604602
help

drivers/hid/hid-lenovo.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@
3232
#include <linux/leds.h>
3333
#include <linux/workqueue.h>
3434

35-
#include <linux/platform_profile.h>
36-
3735
#include "hid-ids.h"
3836

3937
/* Userspace expects F20 for mic-mute KEY_MICMUTE does not work */
@@ -734,7 +732,7 @@ static int lenovo_raw_event_TP_X12_tab(struct hid_device *hdev, u32 raw_data)
734732
report_key_event(input, KEY_RFKILL);
735733
return 1;
736734
}
737-
platform_profile_cycle();
735+
report_key_event(input, KEY_PERFORMANCE);
738736
return 1;
739737
case TP_X12_RAW_HOTKEY_FN_F10:
740738
/* TAB1 has PICKUP Phone and TAB2 use Snipping tool*/

0 commit comments

Comments
 (0)