From: Sasha Levin <sashal@kernel.org>
To: patches@lists.linux.dev, stable@vger.kernel.org
Cc: "Gašper Nemgar" <gasper.nemgar@gmail.com>,
"Hans de Goede" <hdegoede@redhat.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Sasha Levin" <sashal@kernel.org>,
ikepanhc@gmail.com, platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH AUTOSEL 6.14 07/20] platform/x86: ideapad-laptop: add support for some new buttons
Date: Tue, 6 May 2025 17:35:10 -0400 [thread overview]
Message-ID: <20250506213523.2982756-7-sashal@kernel.org> (raw)
In-Reply-To: <20250506213523.2982756-1-sashal@kernel.org>
From: Gašper Nemgar <gasper.nemgar@gmail.com>
[ Upstream commit 02c6e43397c39edd0c172859bf8c851b46be09a8 ]
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>
---
drivers/platform/x86/ideapad-laptop.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
index 30bd366d7b58a..b740c7bb81015 100644
--- a/drivers/platform/x86/ideapad-laptop.c
+++ b/drivers/platform/x86/ideapad-laptop.c
@@ -1308,6 +1308,16 @@ static const struct key_entry ideapad_keymap[] = {
/* Specific to some newer models */
{ KE_KEY, 0x3e | IDEAPAD_WMI_KEY, { KEY_MICMUTE } },
{ KE_KEY, 0x3f | IDEAPAD_WMI_KEY, { KEY_RFKILL } },
+ /* Star- (User Assignable Key) */
+ { KE_KEY, 0x44 | IDEAPAD_WMI_KEY, { KEY_PROG1 } },
+ /* Eye */
+ { KE_KEY, 0x45 | IDEAPAD_WMI_KEY, { KEY_PROG3 } },
+ /* Performance toggle also Fn+Q, handled inside ideapad_wmi_notify() */
+ { KE_KEY, 0x3d | IDEAPAD_WMI_KEY, { KEY_PROG4 } },
+ /* shift + prtsc */
+ { KE_KEY, 0x2d | IDEAPAD_WMI_KEY, { KEY_CUT } },
+ { KE_KEY, 0x29 | IDEAPAD_WMI_KEY, { KEY_TOUCHPAD_TOGGLE } },
+ { KE_KEY, 0x2a | IDEAPAD_WMI_KEY, { KEY_ROOT_MENU } },
{ KE_END },
};
@@ -2094,6 +2104,12 @@ static void ideapad_wmi_notify(struct wmi_device *wdev, union acpi_object *data)
dev_dbg(&wdev->dev, "WMI fn-key event: 0x%llx\n",
data->integer.value);
+ /* performance button triggered by 0x3d */
+ if (data->integer.value == 0x3d && priv->dytc) {
+ platform_profile_cycle();
+ break;
+ }
+
/* 0x02 FnLock, 0x03 Esc */
if (data->integer.value == 0x02 || data->integer.value == 0x03)
ideapad_fn_lock_led_notify(priv, data->integer.value == 0x02);
--
2.39.5
next prev parent reply other threads:[~2025-05-06 21:35 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-06 21:35 [PATCH AUTOSEL 6.14 01/20] ASoC: imx-card: Adjust over allocation of memory in imx_card_parse_of() Sasha Levin
2025-05-06 21:35 ` [PATCH AUTOSEL 6.14 02/20] book3s64/radix: Fix compile errors when CONFIG_ARCH_WANT_OPTIMIZE_DAX_VMEMMAP=n Sasha Levin
2025-05-06 21:35 ` [PATCH AUTOSEL 6.14 03/20] pinctrl: meson: define the pull up/down resistor value as 60 kOhm Sasha Levin
2025-05-06 21:35 ` [PATCH AUTOSEL 6.14 04/20] smb: server: smb2pdu: check return value of xa_store() Sasha Levin
2025-05-06 21:35 ` [PATCH AUTOSEL 6.14 05/20] platform/x86/intel: hid: Add Pantherlake support Sasha Levin
2025-05-06 21:35 ` [PATCH AUTOSEL 6.14 06/20] platform/x86: asus-wmi: Disable OOBE state after resume from hibernation Sasha Levin
2025-05-06 21:35 ` Sasha Levin [this message]
2025-05-06 21:35 ` [PATCH AUTOSEL 6.14 08/20] ASoC: cs42l43: Disable headphone clamps during type detection Sasha Levin
2025-05-06 21:35 ` [PATCH AUTOSEL 6.14 09/20] ASoC: Intel: bytcr_rt5640: Add DMI quirk for Acer Aspire SW3-013 Sasha Levin
2025-05-06 21:35 ` [PATCH AUTOSEL 6.14 10/20] ALSA: hda/realtek: Add quirk for HP Spectre x360 15-df1xxx Sasha Levin
2025-05-06 21:35 ` [PATCH AUTOSEL 6.14 11/20] drm/ttm: fix the warning for hit_low and evict_low Sasha Levin
2025-05-06 21:35 ` [PATCH AUTOSEL 6.14 12/20] nvme-pci: add quirks for device 126f:1001 Sasha Levin
2025-05-06 21:35 ` [PATCH AUTOSEL 6.14 13/20] nvme-pci: add quirks for WDC Blue SN550 15b7:5009 Sasha Levin
2025-05-06 21:35 ` [PATCH AUTOSEL 6.14 14/20] ALSA: usb-audio: Fix duplicated name in MIDI substream names Sasha Levin
2025-05-06 21:35 ` [PATCH AUTOSEL 6.14 15/20] nvmet-tcp: don't restore null sk_state_change Sasha Levin
2025-05-06 21:35 ` [PATCH AUTOSEL 6.14 16/20] io_uring/fdinfo: annotate racy sq/cq head/tail reads Sasha Levin
2025-05-06 21:35 ` [PATCH AUTOSEL 6.14 17/20] cifs: Fix and improve cifs_query_path_info() and cifs_query_file_info() Sasha Levin
2025-05-06 21:35 ` [PATCH AUTOSEL 6.14 18/20] cifs: Fix changing times and read-only attr over SMB1 smb_set_file_info() function Sasha Levin
2025-05-06 21:35 ` [PATCH AUTOSEL 6.14 19/20] ASoC: intel/sdw_utils: Add volume limit to cs42l43 speakers Sasha Levin
2025-05-06 21:35 ` [PATCH AUTOSEL 6.14 20/20] ASoC: intel/sdw_utils: Add volume limit to cs35l56 speakers Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250506213523.2982756-7-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=gasper.nemgar@gmail.com \
--cc=hdegoede@redhat.com \
--cc=ikepanhc@gmail.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@lists.linux.dev \
--cc=platform-driver-x86@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox