HID: multitouch: Preserve class quirks when inverting orientation
PATCH 1/1 HID: multitouch: Preserve class quirks when inverting orientation
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.
--- drivers/hid/hid-multitouch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/hid-multitouch.c +1 -1
@@ -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.
Signature · 1 line
2.47.3
A message that is not in the archive (sent off-list or not yet received): CAK77STDQ+BDPJfxyewHDzf2VNkekV2dRapF-STmXyMazvxOyEQ@mail.gmail.com
Hi Jiri, Benjamin,
Just a gentle ping on this patch.
Thanks,
Muhammed
Asiye Sarıyıldız <[email protected]>, 15 Kas 2026 Paz, 09:01 tarihinde şunu yazdı:
Quoted 39 lines
Hi Jiri, Benjamin,
Just a gentle ping on this patch.
Thanks,
MuhammedMuhammed Sariyildiz <[email protected]>, 5 Kas 2026 Per, 20:43 tarihinde şunu yazdı:
Quoted 30 lines
When exactly one coordinate axis is inverted,
mt_probe()replaces the device class quirks withMT_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 <[email protected]>--- drivers/hid/hid-multitouch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/hid/hid-multitouch.c +1
-2@@ -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. -- 2.47.3
Quoted 18 lines · Muhammed Sariyildiz
When exactly one coordinate axis is inverted,
mt_probe()replaces the device class quirks withMT_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 <[email protected]>--- drivers/hid/hid-multitouch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/hid/hid-multitouch.c +0
-0
drivers/hid/hid-multitouch.c static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id) · line 2161
Quoted 8 lines
drivers/hid/hid-multitouch.c +1
-1@@ -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.
Signature · 2 lines
Jiri Kosina SUSE Labs