Skip to content

Commit e163ea2

Browse files
committed
uclogic: Say "touch ring" not "dial"
Change *_frame_dial* names to *_frame_touch_ring* in UC-Logic driver to leave space for actual dial wheel found on Huion Q620M.
1 parent 2f834f1 commit e163ea2

3 files changed

Lines changed: 23 additions & 20 deletions

File tree

hid-uclogic-params.c

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -751,33 +751,36 @@ static int uclogic_params_huion_init(struct uclogic_params *params,
751751
goto cleanup;
752752
}
753753

754-
/* Create v2 frame dial parameters */
754+
/* Create v2 frame touch ring parameters */
755755
rc = uclogic_params_frame_init_with_desc(
756756
&p.frame_list[1],
757-
uclogic_rdesc_v2_frame_dial_arr,
758-
uclogic_rdesc_v2_frame_dial_size,
759-
UCLOGIC_RDESC_V2_FRAME_DIAL_ID);
757+
uclogic_rdesc_v2_frame_touch_ring_arr,
758+
uclogic_rdesc_v2_frame_touch_ring_size,
759+
UCLOGIC_RDESC_V2_FRAME_TOUCH_RING_ID);
760760
if (rc != 0) {
761761
hid_err(hdev,
762-
"failed creating v2 frame dial "
762+
"failed creating v2 frame touch ring "
763763
"parameters: %d\n",
764764
rc);
765765
goto cleanup;
766766
}
767767
p.frame_list[1].suffix = "Touch Ring";
768768
p.frame_list[1].dev_id_byte =
769-
UCLOGIC_RDESC_V2_FRAME_DIAL_DEV_ID_BYTE;
769+
UCLOGIC_RDESC_V2_FRAME_TOUCH_RING_DEV_ID_BYTE;
770770
p.frame_list[1].touch_ring_byte = 5;
771771
p.frame_list[1].touch_ring_max = 12;
772772
p.frame_list[1].touch_ring_flip_at = 6;
773773

774-
/* Link button and dial subreports from pen reports */
774+
/*
775+
* Link button and touch ring subreports from pen
776+
* reports
777+
*/
775778
p.pen.subreport_list[0].value = 0xe0;
776779
p.pen.subreport_list[0].id =
777780
UCLOGIC_RDESC_V2_FRAME_BUTTONS_ID;
778781
p.pen.subreport_list[1].value = 0xf0;
779782
p.pen.subreport_list[1].id =
780-
UCLOGIC_RDESC_V2_FRAME_DIAL_ID;
783+
UCLOGIC_RDESC_V2_FRAME_TOUCH_RING_ID;
781784
goto output;
782785
}
783786
hid_dbg(hdev, "pen v2 parameters not found\n");

hid-uclogic-rdesc.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -713,12 +713,12 @@ const __u8 uclogic_rdesc_v2_frame_buttons_arr[] = {
713713
const size_t uclogic_rdesc_v2_frame_buttons_size =
714714
sizeof(uclogic_rdesc_v2_frame_buttons_arr);
715715

716-
/* Fixed report descriptor for (tweaked) v2 frame dial reports */
717-
const __u8 uclogic_rdesc_v2_frame_dial_arr[] = {
716+
/* Fixed report descriptor for (tweaked) v2 frame touch ring reports */
717+
const __u8 uclogic_rdesc_v2_frame_touch_ring_arr[] = {
718718
0x05, 0x01, /* Usage Page (Desktop), */
719719
0x09, 0x07, /* Usage (Keypad), */
720720
0xA1, 0x01, /* Collection (Application), */
721-
0x85, UCLOGIC_RDESC_V2_FRAME_DIAL_ID,
721+
0x85, UCLOGIC_RDESC_V2_FRAME_TOUCH_RING_ID,
722722
/* Report ID (DIAL_ID), */
723723
0x14, /* Logical Minimum (0), */
724724
0x05, 0x0D, /* Usage Page (Digitizer), */
@@ -758,8 +758,8 @@ const __u8 uclogic_rdesc_v2_frame_dial_arr[] = {
758758
0xC0, /* End Collection, */
759759
0xC0 /* End Collection */
760760
};
761-
const size_t uclogic_rdesc_v2_frame_dial_size =
762-
sizeof(uclogic_rdesc_v2_frame_dial_arr);
761+
const size_t uclogic_rdesc_v2_frame_touch_ring_size =
762+
sizeof(uclogic_rdesc_v2_frame_touch_ring_arr);
763763

764764
/* Fixed report descriptor for Ugee EX07 frame */
765765
const __u8 uclogic_rdesc_ugee_ex07_frame_arr[] = {

hid-uclogic-rdesc.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,15 @@ extern const size_t uclogic_rdesc_v1_frame_size;
131131
extern const __u8 uclogic_rdesc_v2_frame_buttons_arr[];
132132
extern const size_t uclogic_rdesc_v2_frame_buttons_size;
133133

134-
/* Report ID for tweaked v2 frame dial reports */
135-
#define UCLOGIC_RDESC_V2_FRAME_DIAL_ID 0xf8
134+
/* Report ID for tweaked v2 frame touch ring reports */
135+
#define UCLOGIC_RDESC_V2_FRAME_TOUCH_RING_ID 0xf8
136136

137-
/* Fixed report descriptor for (tweaked) v2 frame dial reports */
138-
extern const __u8 uclogic_rdesc_v2_frame_dial_arr[];
139-
extern const size_t uclogic_rdesc_v2_frame_dial_size;
137+
/* Fixed report descriptor for (tweaked) v2 frame touch ring reports */
138+
extern const __u8 uclogic_rdesc_v2_frame_touch_ring_arr[];
139+
extern const size_t uclogic_rdesc_v2_frame_touch_ring_size;
140140

141-
/* Device ID byte offset in v2 frame dial reports */
142-
#define UCLOGIC_RDESC_V2_FRAME_DIAL_DEV_ID_BYTE 0x4
141+
/* Device ID byte offset in v2 frame touch ring reports */
142+
#define UCLOGIC_RDESC_V2_FRAME_TOUCH_RING_DEV_ID_BYTE 0x4
143143

144144
/* Fixed report descriptor for Ugee EX07 frame */
145145
extern const __u8 uclogic_rdesc_ugee_ex07_frame_arr[];

0 commit comments

Comments
 (0)