I have this Xenarc 7" touch screen with an eGalaxy controller, USB 0eef:0001. The problem is that the X-Y orientation of the display is 90 degrees off from the touch controller. In Xorg I would fix this with calibration, but I'm trying to do something in android 11, so I need to take a different approach.
Basically, the fix is:
y <- x x <- 4096 - y
I'm trying to track down where to do this. There is a quirk that match this vendor:device:
hid-quirks.c: { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER), HID_QUIRK_MULTI_INPUT | HID_QUIRK_NOGET },
which I thought would mean it would use hid-multitouch.c as the specific hid driver, but I put debug messages in mt_touch_input_mapping() which is where I thought I would do the transformation. What I found is that function never gets called.
[ 3.319231] usb 1-1.1: New USB device found, idVendor=0eef, idProduct=0001, bcdDevice= 1.00
[ 3.327836] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 3.335421] usb 1-1.1: Product: USB TouchController
[ 3.340555] usb 1-1.1: Manufacturer: eGalax Inc.
[ 3.350584] Found special quirk 0x48 for HID device 0x0eef:0x0001
but I think I see evidence that it is being driven by only hid-generic:
[ 3.411400] hid-generic 0003:0EEF:0001.0001: input,hidraw0: USB HID v2.10 Pointer [eGalax Inc. USB TouchController] on usb-0000:01:00.0-1.1/input0
and there's no code in hid-generic to deal specifically with touch screens.
getevent does see events from touches:
/dev/input/event1: EV_SYN SYN_REPORT 00000000
/dev/input/event1: EV_ABS ABS_X 000007b5
/dev/input/event1: EV_ABS ABS_Y 000006ba
I'm left trying to figure out how this works, and wondering if it's not being used as a multitouch device at all but, rather, it's just sending EV_ABS events. Net, I looked in drivers/hid to see what sends those, and the only thing I can find is wacom_wac.c. I do not think that's being used here because there's no mention of it in dmesg or /sys.
So I'm left wondering what's processing these device events and sending them on to the input subsystem, and, probably more to the point, where can I intercept them (in the kernel) so that I can do my affine transformation magic on x and y ? Is it actually all handled by hid-input.c ? It seems like me adding the rotation as a quirk would be an awful thing to do in such a generic place, and that I need to figure out how to force it to use hid-multitouch or maybe something new.