Unverified Commit 7e16ae55 authored by Vishnu Sankar's avatar Vishnu Sankar Committed by Ilpo Järvinen
Browse files

platform/x86: thinkpad-acpi: Add support for hotkey 0x1401



F8 mode key on Lenovo 2025 platforms use a different key code.
Adding support for the new keycode 0x1401.

Tested on X1 Carbon Gen 13 and X1 2-in-1 Gen 10.

Signed-off-by: default avatarVishnu Sankar <vishnuocv@gmail.com>
Reviewed-by: default avatarMark Pearson <mpearson-lenovo@squebb.ca>
Link: https://lore.kernel.org/r/20241227231840.21334-1-vishnuocv@gmail.com


Reviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
parent 032fe9b0
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -445,8 +445,10 @@ event code Key Notes
0x1008	0x07	FN+F8		IBM: toggle screen expand
				Lenovo: configure UltraNav,
				or toggle screen expand.
				On newer platforms (2024+)
				replaced by 0x131f (see below)
				On 2024 platforms replaced by
				0x131f (see below) and on newer
				platforms (2025 +) keycode is
				replaced by 0x1401 (see below).

0x1009	0x08	FN+F9		-

@@ -506,9 +508,11 @@ event code Key Notes

0x1019	0x18	unknown

0x131f	...	FN+F8	        Platform Mode change.
0x131f	...	FN+F8		Platform Mode change (2024 systems).
				Implemented in driver.

0x1401	...	FN+F8		Platform Mode change (2025 + systems).
				Implemented in driver.
...	...	...

0x1020	0x1F	unknown
+3 −1
Original line number Diff line number Diff line
@@ -184,7 +184,8 @@ enum tpacpi_hkey_event_t {
						   */
	TP_HKEY_EV_AMT_TOGGLE		= 0x131a, /* Toggle AMT on/off */
	TP_HKEY_EV_DOUBLETAP_TOGGLE	= 0x131c, /* Toggle trackpoint doubletap on/off */
	TP_HKEY_EV_PROFILE_TOGGLE	= 0x131f, /* Toggle platform profile */
	TP_HKEY_EV_PROFILE_TOGGLE	= 0x131f, /* Toggle platform profile in 2024 systems */
	TP_HKEY_EV_PROFILE_TOGGLE2	= 0x1401, /* Toggle platform profile in 2025 + systems */

	/* Reasons for waking up from S3/S4 */
	TP_HKEY_EV_WKUP_S3_UNDOCK	= 0x2304, /* undock requested, S3 */
@@ -11200,6 +11201,7 @@ static bool tpacpi_driver_event(const unsigned int hkey_event)
		tp_features.trackpoint_doubletap = !tp_features.trackpoint_doubletap;
		return true;
	case TP_HKEY_EV_PROFILE_TOGGLE:
	case TP_HKEY_EV_PROFILE_TOGGLE2:
		platform_profile_cycle();
		return true;
	}