Re: [PATCH v2 1/2] Input: soc_button_array - support AMD variant Surface devices

From: Andy Shevchenko

Date: Mon Nov 09 2026 - 02:14:27 EST


On Sun, Nov 8, 2026 at 11:37 PM Antonio Vázquez Blanco
<antoniovazquezblanco@xxxxxxxxx> wrote:
>
> From: Sachi King <nakato@xxxxxxxxx>
>
> The power button on the AMD variants of the Surface Laptop 3 and 4 uses
> the same MSHW0040 device ID as the 5th and later generations of Surface
> devices, so soc_button_array matches it. The device check then rejects
> it, and surfacepro3_button binds instead, which is the wrong driver.
>
> soc_device_check_MSHW0040() evaluates function 2 of the MSHW0040 _DSM,
> the OEM Platform Revision, and treats a returned 0 as proof that the
> _DSM is not there. That is wrong: 0 is a valid revision. The AMD
> variants implement the function and return 0, so the check rejects
> exactly the devices it is meant to accept.
>
> What separates the two groups is whether the device implements that
> function at all, which function 0 of the same _DSM advertises. Of the 32
> Surface models carrying MSHW0040 in the ACPI dumps at [1]:
>
> fn 0 mask fn 2 advertised models
> no _DSM no Surface Pro 4
> 0x03 no Surface Book 1
> 0x05 yes Surface Laptop 1, 2
> 0x0d yes Surface Book 2, Laptop SE, Studio 2
> 0x0f yes the remaining 25
>
> Only two models do not advertise it, and they are exactly the two that
> need surfacepro3_button: the Surface Pro 4, whose MSHW0040 device
> carries no _DSM at all, and the Surface Book 1, whose _DSM advertises
> functions 0 and 1 only, function 1 there being dGPU base attach
> handling.
>
> Use acpi_check_dsm() to make the decision, and keep evaluating the
> revision afterwards so that it remains available through dev_dbg().

> [1] https://github.com/linux-surface/acpidumps

Make it a Link tag in a form of
Link: $URL [1]


> Fixes: c394159310d0 ("Input: soc_button_array - add support for newer surface devices")
> Link: https://lore.kernel.org/all/20211109081125.41410-1-nakato@xxxxxxxxx/

This tag is not referred in the text, make sure you have somewhere the
reference to [2] and mark it so here
Link: $URL [2]
(or drop completely)

> Co-developed-by: Maximilian Luz <luzmaximilian@xxxxxxxxx>
> Signed-off-by: Maximilian Luz <luzmaximilian@xxxxxxxxx>
> Signed-off-by: Sachi King <nakato@xxxxxxxxx>

--
With Best Regards,
Andy Shevchenko