Skip to content

Commit 8e402a6

Browse files
gapemirjfvogel
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> (cherry picked from commit 4c7a0425fb6209a756f8e63cd2a6f7bf0a1f962a) Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
1 parent 0c719de commit 8e402a6

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

13011311
{ KE_END },
13021312
};
@@ -2083,6 +2093,12 @@ static void ideapad_wmi_notify(struct wmi_device *wdev, union acpi_object *data)
20832093
dev_dbg(&wdev->dev, "WMI fn-key event: 0x%llx\n",
20842094
data->integer.value);
20852095

2096+
/* performance button triggered by 0x3d */
2097+
if (data->integer.value == 0x3d && priv->dytc) {
2098+
platform_profile_cycle();
2099+
break;
2100+
}
2101+
20862102
/* 0x02 FnLock, 0x03 Esc */
20872103
if (data->integer.value == 0x02 || data->integer.value == 0x03)
20882104
ideapad_fn_lock_led_notify(priv, data->integer.value == 0x02);

0 commit comments

Comments
 (0)