Re: [PATCH v2] HID: multitouch: Add quirks for flipped axes

Dmitry Torokhov
2022-12-12T18:47:55Z

On Thu, Dec 08, 2022 at 04:58:36PM +0000, Allen Ballway wrote:
> Certain touchscreen devices, such as the ELAN9034, are oriented
> incorrectly and report touches on opposite points on the X and Y axes.
> For example, a 100x200 screen touched at (10,20) would report (90, 180)
> and vice versa.
>
> This is fixed by adding device quirks to transform the touch points
> into the correct spaces, from X -> MAX(X) - X, and Y -> MAX(Y) - Y.
>
> Signed-off-by: Allen Ballway <ballway@chromium.org>
> ---
> V1 -> V2: Address review comments, change to use DMI match. Confirmed
> MT_TOOL_X/Y require transformation and update orientation based on
> flipped axes.

I think you might need to push the DMI match into i2c-hid driver, and
bubble the quirks up here, otherwise if you connect a 2nd USB
touchscreen to such a system will also result in the quirk being applied
to it as far as I understand. In i2c-hid you can make a fine-grained
match on vendor/product and system to limit the quirk to hopefully the
right peripheral.

Thanks.

--
Dmitry