2022-04-22 21:14:22

by José Expósito

[permalink] [raw]
Subject: [PATCH for-5.19/uclogic 0/5] DIGImend patches, part V

Hi everyone,

This series is a follow up to [1], [2], [3] and [4] upstreaming 5 more
patches authored by Nikolai from the DIGImend project.

Patches 1 and 2 are documentation improvements.

Patch 3 allows to create a keyboard interface to the tablets that have
a "Usage (Keyboard)" in their descriptor, like for example the Huion
HS611, which has media keys [5].

However, some of the tablets that have a keyboard usage, also have an
invalid pen usage, creating an invalid pen interface. Patches 4 and 5
allow to disable it.

As always, many thanks to Jiří and Nikolai for their work :D

José Expósito

[1] https://lore.kernel.org/linux-input/[email protected]/T/
[2] https://lore.kernel.org/linux-input/[email protected]/T/
[3] https://lore.kernel.org/linux-input/[email protected]/T/
[4] https://lore.kernel.org/linux-input/[email protected]/T/
[5] https://www.huion.com/es/pen_tablet/HS/huion-hs611.html

Nikolai Kondrashov (5):
HID: uclogic: Clarify params desc_size description
HID: uclogic: Clarify pen/frame desc_ptr description
HID: uclogic: Pass keyboard reports as is
HID: uclogic: Support disabling pen usage
HID: uclogic: Disable pen usage for Huion keyboard interfaces

drivers/hid/hid-uclogic-core.c | 19 +++++++++++++++++++
drivers/hid/hid-uclogic-params.c | 9 +++++++--
drivers/hid/hid-uclogic-params.h | 17 ++++++++++++-----
3 files changed, 38 insertions(+), 7 deletions(-)

--
2.25.1


2022-04-22 21:41:42

by José Expósito

[permalink] [raw]
Subject: [PATCH for-5.19/uclogic 3/5] HID: uclogic: Pass keyboard reports as is

From: Nikolai Kondrashov <[email protected]>

Allow keyboard reports from interface #1 of Huion tablets to pass
unmodified, and stop the Wacom X.org driver from handling them.

The method for the latter is rather crude and also take the Dial reports
from the Wacom driver, but it's expected that libinput will be able to
handle them (still to be tested).

This enables Huion HS611 media and desktop keys.

Signed-off-by: Nikolai Kondrashov <[email protected]>
Signed-off-by: José Expósito <[email protected]>
---
drivers/hid/hid-uclogic-params.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/hid/hid-uclogic-params.c b/drivers/hid/hid-uclogic-params.c
index 09c332c6a412..b85585ac3372 100644
--- a/drivers/hid/hid-uclogic-params.c
+++ b/drivers/hid/hid-uclogic-params.c
@@ -711,8 +711,12 @@ static int uclogic_params_huion_init(struct uclogic_params *params,
iface = to_usb_interface(hdev->dev.parent);
bInterfaceNumber = iface->cur_altsetting->desc.bInterfaceNumber;

- /* If it's not a pen interface */
- if (bInterfaceNumber != 0) {
+ /* If it's a custom keyboard interface */
+ if (bInterfaceNumber == 1) {
+ /* Keep everything intact */
+ goto output;
+ /* Else, if it's not a pen interface */
+ } else if (bInterfaceNumber != 0) {
uclogic_params_init_invalid(&p);
goto output;
}
--
2.25.1

2022-05-06 14:15:56

by Jiri Kosina

[permalink] [raw]
Subject: Re: [PATCH for-5.19/uclogic 0/5] DIGImend patches, part V

On Thu, 21 Apr 2022, José Expósito wrote:

> Hi everyone,
>
> This series is a follow up to [1], [2], [3] and [4] upstreaming 5 more
> patches authored by Nikolai from the DIGImend project.
>
> Patches 1 and 2 are documentation improvements.
>
> Patch 3 allows to create a keyboard interface to the tablets that have
> a "Usage (Keyboard)" in their descriptor, like for example the Huion
> HS611, which has media keys [5].
>
> However, some of the tablets that have a keyboard usage, also have an
> invalid pen usage, creating an invalid pen interface. Patches 4 and 5
> allow to disable it.
>
> As always, many thanks to Jiří and Nikolai for their work :D
>
> José Expósito
>
> [1] https://lore.kernel.org/linux-input/[email protected]/T/
> [2] https://lore.kernel.org/linux-input/[email protected]/T/
> [3] https://lore.kernel.org/linux-input/[email protected]/T/
> [4] https://lore.kernel.org/linux-input/[email protected]/T/
> [5] https://www.huion.com/es/pen_tablet/HS/huion-hs611.html
>
> Nikolai Kondrashov (5):
> HID: uclogic: Clarify params desc_size description
> HID: uclogic: Clarify pen/frame desc_ptr description
> HID: uclogic: Pass keyboard reports as is
> HID: uclogic: Support disabling pen usage
> HID: uclogic: Disable pen usage for Huion keyboard interfaces
>
> drivers/hid/hid-uclogic-core.c | 19 +++++++++++++++++++
> drivers/hid/hid-uclogic-params.c | 9 +++++++--
> drivers/hid/hid-uclogic-params.h | 17 ++++++++++++-----
> 3 files changed, 38 insertions(+), 7 deletions(-)

Now in hid.git#for-5.19/uclogic

Thanks,

--
Jiri Kosina
SUSE Labs