HID: uclogic: Add HID_QUIRK_HIDINPUT_FORCE quirk
authorJosé Expósito <jose.exposito89@gmail.com>
Thu, 10 Nov 2022 17:40:56 +0000 (18:40 +0100)
committerJiri Kosina <jkosina@suse.cz>
Mon, 21 Nov 2022 17:35:01 +0000 (18:35 +0100)
Commit f7d8e387d9ae ("HID: uclogic: Switch to Digitizer usage for
styluses") changed the usage used in UCLogic from "Pen" to "Digitizer".

However, the IS_INPUT_APPLICATION() macro evaluates to false for
HID_DG_DIGITIZER causing issues with the XP-Pen Star G640 tablet.

Add the HID_QUIRK_HIDINPUT_FORCE quirk to bypass the
IS_INPUT_APPLICATION() check.

Reported-by: Torge Matthies <openglfreak@googlemail.com>
Reported-by: Alexander Zhang <alex@alexyzhang.dev>
Tested-by: Alexander Zhang <alex@alexyzhang.dev>
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-uclogic-core.c

index 0fbc408c26070e6072ef0f939bf2426a9c1e8180..7fa6fe04f1b262656186ccd7a4c9f5fcb52679c8 100644 (file)
@@ -192,6 +192,7 @@ static int uclogic_probe(struct hid_device *hdev,
         * than the pen, so use QUIRK_MULTI_INPUT for all tablets.
         */
        hdev->quirks |= HID_QUIRK_MULTI_INPUT;
+       hdev->quirks |= HID_QUIRK_HIDINPUT_FORCE;
 
        /* Allocate and assign driver data */
        drvdata = devm_kzalloc(&hdev->dev, sizeof(*drvdata), GFP_KERNEL);