Skip to content

Commit 47a754b

Browse files
gapemirSasha Levin
authored andcommitted
platform/x86: ideapad-laptop: add support for some new buttons
[ Upstream commit 02c6e43 ] Add entries to unsupported WMI codes in ideapad_keymap[] and one check for WMI code 0x13d to trigger platform_profile_cycle(). Signed-off-by: Gašper Nemgar <gasper.nemgar@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20250418070738.7171-1-gasper.nemgar@gmail.com [ij: joined nested if ()s & major tweaks to changelog] Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 976a9ec commit 47a754b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

drivers/platform/x86/ideapad-laptop.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,6 +1308,16 @@ static const struct key_entry ideapad_keymap[] = {
13081308
/* Specific to some newer models */
13091309
{ KE_KEY, 0x3e | IDEAPAD_WMI_KEY, { KEY_MICMUTE } },
13101310
{ KE_KEY, 0x3f | IDEAPAD_WMI_KEY, { KEY_RFKILL } },
1311+
/* Star- (User Assignable Key) */
1312+
{ KE_KEY, 0x44 | IDEAPAD_WMI_KEY, { KEY_PROG1 } },
1313+
/* Eye */
1314+
{ KE_KEY, 0x45 | IDEAPAD_WMI_KEY, { KEY_PROG3 } },
1315+
/* Performance toggle also Fn+Q, handled inside ideapad_wmi_notify() */
1316+
{ KE_KEY, 0x3d | IDEAPAD_WMI_KEY, { KEY_PROG4 } },
1317+
/* shift + prtsc */
1318+
{ KE_KEY, 0x2d | IDEAPAD_WMI_KEY, { KEY_CUT } },
1319+
{ KE_KEY, 0x29 | IDEAPAD_WMI_KEY, { KEY_TOUCHPAD_TOGGLE } },
1320+
{ KE_KEY, 0x2a | IDEAPAD_WMI_KEY, { KEY_ROOT_MENU } },
13111321

13121322
{ KE_END },
13131323
};
@@ -2094,6 +2104,12 @@ static void ideapad_wmi_notify(struct wmi_device *wdev, union acpi_object *data)
20942104
dev_dbg(&wdev->dev, "WMI fn-key event: 0x%llx\n",
20952105
data->integer.value);
20962106

2107+
/* performance button triggered by 0x3d */
2108+
if (data->integer.value == 0x3d && priv->dytc) {
2109+
platform_profile_cycle();
2110+
break;
2111+
}
2112+
20972113
/* 0x02 FnLock, 0x03 Esc */
20982114
if (data->integer.value == 0x02 || data->integer.value == 0x03)
20992115
ideapad_fn_lock_led_notify(priv, data->integer.value == 0x02);

0 commit comments

Comments
 (0)