All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Improve HUION Kamvas Pro 24 support
@ 2024-05-24 11:21 José Expósito
  2024-05-24 11:21 ` [PATCH 1/2] HID: uclogic: Support HUION devices with up to 20 buttons José Expósito
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: José Expósito @ 2024-05-24 11:21 UTC (permalink / raw)
  To: jikos
  Cc: benjamin.tissoires, linux-input, linux-kernel,
	José Expósito

This series includes 2 patches to improve support for the HUION Kamvas
Pro 24. See [1] and [2] for additional context.

[1] https://gitlab.freedesktop.org/libinput/libinput/-/issues/989
[2] https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/989

José Expósito (2):
  HID: uclogic: Support HUION devices with up to 20 buttons
  HID: uclogic: Use Rx and Ry for touch strips

 drivers/hid/hid-uclogic-rdesc.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

-- 
2.45.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] HID: uclogic: Support HUION devices with up to 20 buttons
  2024-05-24 11:21 [PATCH 0/2] Improve HUION Kamvas Pro 24 support José Expósito
@ 2024-05-24 11:21 ` José Expósito
  2024-05-24 11:21 ` [PATCH 2/2] HID: uclogic: Use Rx and Ry for touch strips José Expósito
  2024-06-04  8:13 ` [PATCH 0/2] Improve HUION Kamvas Pro 24 support Jiri Kosina
  2 siblings, 0 replies; 4+ messages in thread
From: José Expósito @ 2024-05-24 11:21 UTC (permalink / raw)
  To: jikos
  Cc: benjamin.tissoires, linux-input, linux-kernel,
	José Expósito

The HID descriptor for HUION tablets was limited to 13 buttons. However,
there are devices with more buttons in their frames.

So far, the device with more buttons released by HUION is the Huion
Kamvas Pro 24 (GT-240, QHD) [1], with 20 buttons.

Tweak the HID descriptor to support it.

Link: https://gitlab.freedesktop.org/libinput/libinput/-/issues/989  [1]
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
---
 drivers/hid/hid-uclogic-rdesc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/hid/hid-uclogic-rdesc.c b/drivers/hid/hid-uclogic-rdesc.c
index b6dfdf6356a6..7cbd673747a5 100644
--- a/drivers/hid/hid-uclogic-rdesc.c
+++ b/drivers/hid/hid-uclogic-rdesc.c
@@ -689,10 +689,10 @@ const size_t uclogic_rdesc_v2_pen_template_size =
 	0xA0,           /*      Collection (Physical),          */ \
 	0x05, 0x09,     /*          Usage Page (Button),        */ \
 	0x19, 0x01,     /*          Usage Minimum (01h),        */ \
-	0x29, 0x03,     /*          Usage Maximum (03h),        */ \
-	0x95, 0x03,     /*          Report Count (3),           */ \
+	0x29, 0x0A,     /*          Usage Maximum (0Ah),        */ \
+	0x95, 0x0A,     /*          Report Count (10),          */ \
 	0x81, 0x02,     /*          Input (Variable),           */ \
-	0x95, ((_size) * 8 - 45),                                  \
+	0x95, ((_size) * 8 - 52),                                  \
 			/*          Report Count (padding),     */ \
 	0x81, 0x01,     /*          Input (Constant),           */ \
 	0xC0,           /*      End Collection,                 */ \
-- 
2.45.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] HID: uclogic: Use Rx and Ry for touch strips
  2024-05-24 11:21 [PATCH 0/2] Improve HUION Kamvas Pro 24 support José Expósito
  2024-05-24 11:21 ` [PATCH 1/2] HID: uclogic: Support HUION devices with up to 20 buttons José Expósito
@ 2024-05-24 11:21 ` José Expósito
  2024-06-04  8:13 ` [PATCH 0/2] Improve HUION Kamvas Pro 24 support Jiri Kosina
  2 siblings, 0 replies; 4+ messages in thread
From: José Expósito @ 2024-05-24 11:21 UTC (permalink / raw)
  To: jikos
  Cc: benjamin.tissoires, linux-input, linux-kernel,
	José Expósito

Currently, HUION devices use ABS_WHEEL as the usage for touch strips.

There are 2 main issues with this approach:

The first one is that the descriptor for touch rings
(uclogic_rdesc_v2_frame_touch_ring_arr) also uses ABS_WHEEL.
From user-space it is impossible to know which device sends the events.

The second one is that Wacom uses ABS_RX/ABS_RY to notify events from
touch strips and user-space was designed to handle those axes.

Change the usage of touch strips to Rx/Ry to fix both issues.

Link: https://gitlab.freedesktop.org/libinput/libinput/-/issues/989
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
---
 drivers/hid/hid-uclogic-rdesc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/hid/hid-uclogic-rdesc.c b/drivers/hid/hid-uclogic-rdesc.c
index 7cbd673747a5..dfd74a043b39 100644
--- a/drivers/hid/hid-uclogic-rdesc.c
+++ b/drivers/hid/hid-uclogic-rdesc.c
@@ -789,7 +789,8 @@ const __u8 uclogic_rdesc_v2_frame_touch_strip_arr[] = {
 	0x95, 0x01,         /*          Report Count (1),           */
 	0x81, 0x02,         /*          Input (Variable),           */
 	0x05, 0x01,         /*          Usage Page (Desktop),       */
-	0x09, 0x38,         /*          Usage (Wheel),              */
+	0x09, 0x33,         /*          Usage (Rx),                 */
+	0x09, 0x34,         /*          Usage (Ry),                 */
 	0x95, 0x01,         /*          Report Count (1),           */
 	0x15, 0x00,         /*          Logical Minimum (0),        */
 	0x25, 0x07,         /*          Logical Maximum (7),        */
-- 
2.45.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] Improve HUION Kamvas Pro 24 support
  2024-05-24 11:21 [PATCH 0/2] Improve HUION Kamvas Pro 24 support José Expósito
  2024-05-24 11:21 ` [PATCH 1/2] HID: uclogic: Support HUION devices with up to 20 buttons José Expósito
  2024-05-24 11:21 ` [PATCH 2/2] HID: uclogic: Use Rx and Ry for touch strips José Expósito
@ 2024-06-04  8:13 ` Jiri Kosina
  2 siblings, 0 replies; 4+ messages in thread
From: Jiri Kosina @ 2024-06-04  8:13 UTC (permalink / raw)
  To: José Expósito; +Cc: benjamin.tissoires, linux-input, linux-kernel

On Fri, 24 May 2024, José Expósito wrote:

> This series includes 2 patches to improve support for the HUION Kamvas
> Pro 24. See [1] and [2] for additional context.
> 
> [1] https://gitlab.freedesktop.org/libinput/libinput/-/issues/989
> [2] https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/989
> 
> José Expósito (2):
>   HID: uclogic: Support HUION devices with up to 20 buttons
>   HID: uclogic: Use Rx and Ry for touch strips

Applied, thanks José.

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-06-04  8:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-24 11:21 [PATCH 0/2] Improve HUION Kamvas Pro 24 support José Expósito
2024-05-24 11:21 ` [PATCH 1/2] HID: uclogic: Support HUION devices with up to 20 buttons José Expósito
2024-05-24 11:21 ` [PATCH 2/2] HID: uclogic: Use Rx and Ry for touch strips José Expósito
2024-06-04  8:13 ` [PATCH 0/2] Improve HUION Kamvas Pro 24 support Jiri Kosina

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.