Re: [PATCH] HID: multitouch: Preserve class quirks when inverting orientation
From: Jiri Kosina
Date: Thu Nov 19 2026 - 16:26:22 EST
On Thu, 5 Nov 2026, Muhammed Sariyildiz wrote:
> When exactly one coordinate axis is inverted, mt_probe() replaces the
> device class quirks with MT_QUIRK_ORIENTATION_INVERT. This drops all
> quirks selected for the device class. Applications created later
> inherit the truncated quirk mask, which can break device-specific
> contact handling.
>
> Add the orientation quirk instead of replacing the existing mask.
>
> Signed-off-by: Muhammed Sariyildiz <asiyee994@xxxxxxxxx>
> ---
> drivers/hid/hid-multitouch.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
> index 4e19a0c..94e83fc 100644
> --- a/drivers/hid/hid-multitouch.c
> +++ b/drivers/hid/hid-multitouch.c
> @@ -2155,7 +2155,7 @@ static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id)
> if (hdev->quirks & (HID_QUIRK_X_INVERT | HID_QUIRK_Y_INVERT) &&
> !((hdev->quirks & HID_QUIRK_X_INVERT)
> && (hdev->quirks & HID_QUIRK_Y_INVERT)))
> - td->mtclass.quirks = MT_QUIRK_ORIENTATION_INVERT;
> + td->mtclass.quirks |= MT_QUIRK_ORIENTATION_INVERT;
>
> /* This allows the driver to correctly support devices
> * that emit events over several HID messages.
Applied, thanks.
--
Jiri Kosina
SUSE Labs