Linux Input/HID development
 help / color / mirror / Atom feed
* [PATCH] HID: multitouch: Preserve class quirks when inverting orientation
@ 2026-11-05 17:42 Muhammed Sariyildiz
  0 siblings, 0 replies; only message in thread
From: Muhammed Sariyildiz @ 2026-11-05 17:42 UTC (permalink / raw)
  To: jikos; +Cc: bentiss, linux-input, linux-kernel

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@gmail.com>
---
 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.
-- 
2.47.3


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-05 17:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-05 17:42 [PATCH] HID: multitouch: Preserve class quirks when inverting orientation Muhammed Sariyildiz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox