Skip to content

Commit 02c6e43

Browse files
gapemirij-intel
authored andcommitted
platform/x86: ideapad-laptop: add support for some new buttons
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>
1 parent 77bdac7 commit 02c6e43

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
@@ -1294,6 +1294,16 @@ static const struct key_entry ideapad_keymap[] = {
12941294
/* Specific to some newer models */
12951295
{ KE_KEY, 0x3e | IDEAPAD_WMI_KEY, { KEY_MICMUTE } },
12961296
{ KE_KEY, 0x3f | IDEAPAD_WMI_KEY, { KEY_RFKILL } },
1297+
/* Star- (User Assignable Key) */
1298+
{ KE_KEY, 0x44 | IDEAPAD_WMI_KEY, { KEY_PROG1 } },
1299+
/* Eye */
1300+
{ KE_KEY, 0x45 | IDEAPAD_WMI_KEY, { KEY_PROG3 } },
1301+
/* Performance toggle also Fn+Q, handled inside ideapad_wmi_notify() */
1302+
{ KE_KEY, 0x3d | IDEAPAD_WMI_KEY, { KEY_PROG4 } },
1303+
/* shift + prtsc */
1304+
{ KE_KEY, 0x2d | IDEAPAD_WMI_KEY, { KEY_CUT } },
1305+
{ KE_KEY, 0x29 | IDEAPAD_WMI_KEY, { KEY_TOUCHPAD_TOGGLE } },
1306+
{ KE_KEY, 0x2a | IDEAPAD_WMI_KEY, { KEY_ROOT_MENU } },
12971307

12981308
{ KE_END },
12991309
};
@@ -2080,6 +2090,12 @@ static void ideapad_wmi_notify(struct wmi_device *wdev, union acpi_object *data)
20802090
dev_dbg(&wdev->dev, "WMI fn-key event: 0x%llx\n",
20812091
data->integer.value);
20822092

2093+
/* performance button triggered by 0x3d */
2094+
if (data->integer.value == 0x3d && priv->dytc) {
2095+
platform_profile_cycle();
2096+
break;
2097+
}
2098+
20832099
/* 0x02 FnLock, 0x03 Esc */
20842100
if (data->integer.value == 0x02 || data->integer.value == 0x03)
20852101
ideapad_fn_lock_led_notify(priv, data->integer.value == 0x02);

0 commit comments

Comments
 (0)