[PATCH AUTOSEL 6.19-5.10] platform/x86: intel-hid: Enable 5-button array on ThinkPad X1 Fold 16 Gen 1

From: Sasha Levin

Date: Tue Mar 10 2026 - 05:11:58 EST


From: Leif Skunberg <diamondback@xxxxxxxxxx>

[ Upstream commit b38d478dad79e61e8a65931021bdfd7a71741212 ]

The Lenovo ThinkPad X1 Fold 16 Gen 1 has physical volume up/down
buttons that are handled through the intel-hid 5-button array
interface. The firmware does not advertise 5-button array support via
HEBC, so the driver relies on a DMI allowlist to enable it.

Add the ThinkPad X1 Fold 16 Gen 1 to the button_array_table so the
volume buttons work out of the box.

Signed-off-by: Leif Skunberg <diamondback@xxxxxxxxxx>
Reviewed-by: Hans de Goede <johannes.goede@xxxxxxxxxxxxxxxx>
Link: https://patch.msgid.link/20260210085625.34380-1-diamondback@xxxxxxxxxx
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
---

LLM Generated explanations, may be completely bogus:

## Analysis

### What the commit does

This commit adds a single DMI table entry for the Lenovo ThinkPad X1
Fold 16 Gen 1 to the `button_array_table` in
`drivers/platform/x86/intel/hid.c`. This enables the intel-hid 5-button
array interface for physical volume up/down buttons on this specific
laptop, whose firmware does not advertise 5-button array support via the
HEBC ACPI method.

### Classification: Hardware Quirk/Workaround

This is a textbook DMI allowlist addition — one of the explicitly
allowed exception categories for stable backporting. The pattern is
identical to the existing entries for HP Spectre x2, ThinkPad X1 Tablet
Gen 1/2, Microsoft Surface Go 3/4, etc.

### Stable kernel criteria assessment

- **Obviously correct and tested**: Yes. The 7-line addition follows the
exact same `DMI_MATCH(DMI_SYS_VENDOR, "LENOVO")` +
`DMI_MATCH(DMI_PRODUCT_FAMILY, ...)` pattern used by the two existing
Lenovo entries directly above it.
- **Fixes a real bug**: Yes. Volume buttons are non-functional without
this entry because firmware doesn't advertise the capability.
- **Small and contained**: Yes. 7 lines added to a single DMI table in
one file. No logic changes whatsoever.
- **No new features**: Correct. This enables an existing driver
interface on specific hardware — an allowed exception.
- **No dependencies**: The `button_array_table` and its usage have been
in the driver for years. No prerequisite commits needed.

### Risk assessment

**Extremely low risk.** DMI matching is device-specific — this entry
only activates on systems where `DMI_SYS_VENDOR == "LENOVO"` AND
`DMI_PRODUCT_FAMILY == "ThinkPad X1 Fold 16 Gen 1"`. It cannot affect
any other hardware. The worst-case scenario on a misidentified system
would be the 5-button array being enabled unnecessarily, which is
benign.

### Review quality

The patch has two `Reviewed-by` tags from Hans de Goede (former
platform/x86 co-maintainer) and Ilpo Järvinen (current platform/x86
maintainer who also committed it). This is strong endorsement.

### Verification

- Verified the diff adds only a DMI table entry with no logic changes —
confirmed by reading the patch.
- Verified the new entry follows the identical pattern of existing
entries (DMI_SYS_VENDOR + DMI_PRODUCT_FAMILY matching) — confirmed
from the surrounding context in the diff.
- Verified this is a DMI allowlist (not a blocklist) used to enable
5-button array support — confirmed from the commit message and table
name `button_array_table`.
- Verified reviewers Hans de Goede and Ilpo Järvinen are established
platform/x86 maintainers — this is well-known in the kernel community.
- The file `drivers/platform/x86/intel/hid.c` and the
`button_array_table` have existed in the kernel for years, so this
applies to all active stable trees.

### Conclusion

This is a minimal, zero-risk hardware quirk addition that makes volume
buttons work on a specific Lenovo laptop. It meets all stable kernel
criteria and falls into the explicitly allowed "hardware
quirks/workarounds" category. Two maintainer reviews provide confidence
in correctness.

**YES**

drivers/platform/x86/intel/hid.c | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/drivers/platform/x86/intel/hid.c b/drivers/platform/x86/intel/hid.c
index 5b475a09645a3..f2b309f6e458a 100644
--- a/drivers/platform/x86/intel/hid.c
+++ b/drivers/platform/x86/intel/hid.c
@@ -135,6 +135,13 @@ static const struct dmi_system_id button_array_table[] = {
DMI_MATCH(DMI_PRODUCT_FAMILY, "ThinkPad X1 Tablet Gen 2"),
},
},
+ {
+ .ident = "Lenovo ThinkPad X1 Fold 16 Gen 1",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_FAMILY, "ThinkPad X1 Fold 16 Gen 1"),
+ },
+ },
{
.ident = "Microsoft Surface Go 3",
.matches = {
--
2.51.0