lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 21 Oct 2021 12:05:39 +0200
From:   Benjamin Tissoires <benjamin.tissoires@...hat.com>
To:     Alistair Francis <alistair@...stair23.me>
Cc:     Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Shawn Guo <shawnguo@...nel.org>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        dl-linux-imx <linux-imx@....com>, Jiri Kosina <jikos@...nel.org>,
        "open list:HID CORE LAYER" <linux-input@...r.kernel.org>,
        DTML <devicetree@...r.kernel.org>,
        lkml <linux-kernel@...r.kernel.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        Alistair Francis <alistair23@...il.com>
Subject: Re: [PATCH v12 2/3] HID: quirks: Invert X/Y values for rM2 Wacom

On Thu, Oct 21, 2021 at 11:51 AM Alistair Francis
<alistair@...stair23.me> wrote:
>
> Enable the HID_QUIRK_XY_INVERT quirk for the Wacom digitiser used on the
> reMarkable 2.
>
> Signed-off-by: Alistair Francis <alistair@...stair23.me>
> ---
>  drivers/hid/hid-ids.h    | 2 ++
>  drivers/hid/hid-quirks.c | 1 +
>  2 files changed, 3 insertions(+)
>
> diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
> index 29564b370341..9dc17bf3e550 100644
> --- a/drivers/hid/hid-ids.h
> +++ b/drivers/hid/hid-ids.h
> @@ -1260,8 +1260,10 @@
>  #define USB_DEVICE_ID_VTL_MULTITOUCH_FF3F      0xff3f
>
>  #define USB_VENDOR_ID_WACOM            0x056a
> +#define USB_VENDOR_ID_WACOM_HID                0x2D1F
>  #define USB_DEVICE_ID_WACOM_GRAPHIRE_BLUETOOTH 0x81
>  #define USB_DEVICE_ID_WACOM_INTUOS4_BLUETOOTH   0x00BD
> +#define I2C_DEVICE_ID_WACOM_REMARKABLE2                0x0095
>
>  #define USB_VENDOR_ID_WALTOP                           0x172f
>  #define USB_DEVICE_ID_WALTOP_SLIM_TABLET_5_8_INCH      0x0032
> diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c
> index 2e104682c22b..b081af3329a5 100644
> --- a/drivers/hid/hid-quirks.c
> +++ b/drivers/hid/hid-quirks.c
> @@ -186,6 +186,7 @@ static const struct hid_device_id hid_quirks[] = {
>         { HID_USB_DEVICE(USB_VENDOR_ID_TURBOX, USB_DEVICE_ID_TURBOX_KEYBOARD), HID_QUIRK_NOGET },
>         { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_KNA5), HID_QUIRK_MULTI_INPUT },
>         { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_TWA60), HID_QUIRK_MULTI_INPUT },
> +       { HID_I2C_DEVICE(USB_VENDOR_ID_WACOM_HID, I2C_DEVICE_ID_WACOM_REMARKABLE2), HID_QUIRK_XY_INVERT },

Well, there is no guarantee that this PID will always be installed in
this particular configuration.

Can you instead set the quirk in i2c_hid?:
- retrieve that information from the DT in
drivers/hid/i2c-hid/i2c-hid-of.c (with the generic touchscreen OF
properties)
- amend the signature of i2c_hid_core_probe() to account for extra quirks
- after having allocated the device, add the provided quirks

Then I still need to figure out how we can add tests for the quirk.

Cheers,
Benjamin

>         { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_MEDIA_TABLET_10_6_INCH), HID_QUIRK_MULTI_INPUT },
>         { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_MEDIA_TABLET_14_1_INCH), HID_QUIRK_MULTI_INPUT },
>         { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_SIRIUS_BATTERY_FREE_TABLET), HID_QUIRK_MULTI_INPUT },
> --
> 2.31.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ