提交 c07145fd 编写于 作者: J José Expósito 提交者: sanglipeng

HID: uclogic: Add HID_QUIRK_HIDINPUT_FORCE quirk

stable inclusion
from stable-v5.10.161
commit 7c3a523c9b19ba94c3cade5b2d4612bedcf22e21
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7P7OH

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=7c3a523c9b19ba94c3cade5b2d4612bedcf22e21

--------------------------------

[ Upstream commit 3405a4be ]

Commit f7d8e387 ("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: NTorge Matthies <openglfreak@googlemail.com>
Reported-by: NAlexander Zhang <alex@alexyzhang.dev>
Tested-by: NAlexander Zhang <alex@alexyzhang.dev>
Signed-off-by: NJosé Expósito <jose.exposito89@gmail.com>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: Nsanglipeng <sanglipeng1@jd.com>
上级 d61403c2
...@@ -172,6 +172,7 @@ static int uclogic_probe(struct hid_device *hdev, ...@@ -172,6 +172,7 @@ static int uclogic_probe(struct hid_device *hdev,
* than the pen, so use QUIRK_MULTI_INPUT for all tablets. * than the pen, so use QUIRK_MULTI_INPUT for all tablets.
*/ */
hdev->quirks |= HID_QUIRK_MULTI_INPUT; hdev->quirks |= HID_QUIRK_MULTI_INPUT;
hdev->quirks |= HID_QUIRK_HIDINPUT_FORCE;
/* Allocate and assign driver data */ /* Allocate and assign driver data */
drvdata = devm_kzalloc(&hdev->dev, sizeof(*drvdata), GFP_KERNEL); drvdata = devm_kzalloc(&hdev->dev, sizeof(*drvdata), GFP_KERNEL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册