mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 20:22:09 +00:00
HID: uclogic: Put version first in rdesc namespace
Put general hardware version before everything else in uclogic_rdesc_ namespace. Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Signed-off-by: José Expósito <jose.exposito89@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
parent
2e28f3e099
commit
a985de5818
@ -207,8 +207,8 @@ static int uclogic_params_pen_init_v1(struct uclogic_params_pen *pen,
|
||||
* Generate pen report descriptor
|
||||
*/
|
||||
desc_ptr = uclogic_rdesc_template_apply(
|
||||
uclogic_rdesc_pen_v1_template_arr,
|
||||
uclogic_rdesc_pen_v1_template_size,
|
||||
uclogic_rdesc_v1_pen_template_arr,
|
||||
uclogic_rdesc_v1_pen_template_size,
|
||||
desc_params, ARRAY_SIZE(desc_params));
|
||||
if (desc_ptr == NULL) {
|
||||
rc = -ENOMEM;
|
||||
@ -221,8 +221,8 @@ static int uclogic_params_pen_init_v1(struct uclogic_params_pen *pen,
|
||||
memset(pen, 0, sizeof(*pen));
|
||||
pen->desc_ptr = desc_ptr;
|
||||
desc_ptr = NULL;
|
||||
pen->desc_size = uclogic_rdesc_pen_v1_template_size;
|
||||
pen->id = UCLOGIC_RDESC_PEN_V1_ID;
|
||||
pen->desc_size = uclogic_rdesc_v1_pen_template_size;
|
||||
pen->id = UCLOGIC_RDESC_V1_PEN_ID;
|
||||
pen->inrange = UCLOGIC_PARAMS_PEN_INRANGE_INVERTED;
|
||||
found = true;
|
||||
finish:
|
||||
@ -351,8 +351,8 @@ static int uclogic_params_pen_init_v2(struct uclogic_params_pen *pen,
|
||||
* Generate pen report descriptor
|
||||
*/
|
||||
desc_ptr = uclogic_rdesc_template_apply(
|
||||
uclogic_rdesc_pen_v2_template_arr,
|
||||
uclogic_rdesc_pen_v2_template_size,
|
||||
uclogic_rdesc_v2_pen_template_arr,
|
||||
uclogic_rdesc_v2_pen_template_size,
|
||||
desc_params, ARRAY_SIZE(desc_params));
|
||||
if (desc_ptr == NULL) {
|
||||
rc = -ENOMEM;
|
||||
@ -365,8 +365,8 @@ static int uclogic_params_pen_init_v2(struct uclogic_params_pen *pen,
|
||||
memset(pen, 0, sizeof(*pen));
|
||||
pen->desc_ptr = desc_ptr;
|
||||
desc_ptr = NULL;
|
||||
pen->desc_size = uclogic_rdesc_pen_v2_template_size;
|
||||
pen->id = UCLOGIC_RDESC_PEN_V2_ID;
|
||||
pen->desc_size = uclogic_rdesc_v2_pen_template_size;
|
||||
pen->id = UCLOGIC_RDESC_V2_PEN_ID;
|
||||
pen->inrange = UCLOGIC_PARAMS_PEN_INRANGE_NONE;
|
||||
pen->fragmented_hires = true;
|
||||
pen->tilt_y_flipped = true;
|
||||
@ -487,9 +487,9 @@ static int uclogic_params_frame_init_v1(struct uclogic_params_frame *frame,
|
||||
hid_dbg(hdev, "generic buttons enabled\n");
|
||||
rc = uclogic_params_frame_init_with_desc(
|
||||
frame,
|
||||
uclogic_rdesc_frame_v1_arr,
|
||||
uclogic_rdesc_frame_v1_size,
|
||||
UCLOGIC_RDESC_FRAME_V1_ID);
|
||||
uclogic_rdesc_v1_frame_arr,
|
||||
uclogic_rdesc_v1_frame_size,
|
||||
UCLOGIC_RDESC_V1_FRAME_ID);
|
||||
if (rc != 0)
|
||||
goto cleanup;
|
||||
found = true;
|
||||
@ -752,9 +752,9 @@ static int uclogic_params_huion_init(struct uclogic_params *params,
|
||||
/* Create v2 frame parameters */
|
||||
rc = uclogic_params_frame_init_with_desc(
|
||||
&p.frame,
|
||||
uclogic_rdesc_frame_v2_arr,
|
||||
uclogic_rdesc_frame_v2_size,
|
||||
UCLOGIC_RDESC_FRAME_V2_ID);
|
||||
uclogic_rdesc_v2_frame_arr,
|
||||
uclogic_rdesc_v2_frame_size,
|
||||
UCLOGIC_RDESC_V2_FRAME_ID);
|
||||
if (rc != 0) {
|
||||
hid_err(hdev,
|
||||
"failed creating v2 frame parameters: %d\n",
|
||||
@ -764,7 +764,7 @@ static int uclogic_params_huion_init(struct uclogic_params *params,
|
||||
/* Link frame button subreports from pen reports */
|
||||
p.pen.subreport_list[0].value = 0xe0;
|
||||
p.pen.subreport_list[0].id =
|
||||
UCLOGIC_RDESC_FRAME_V2_ID;
|
||||
UCLOGIC_RDESC_V2_FRAME_ID;
|
||||
goto output;
|
||||
}
|
||||
hid_dbg(hdev, "pen v2 parameters not found\n");
|
||||
@ -791,7 +791,7 @@ static int uclogic_params_huion_init(struct uclogic_params *params,
|
||||
/* Link frame button subreports from pen reports */
|
||||
p.pen.subreport_list[0].value = 0xe0;
|
||||
p.pen.subreport_list[0].id =
|
||||
UCLOGIC_RDESC_FRAME_V1_ID;
|
||||
UCLOGIC_RDESC_V1_FRAME_ID;
|
||||
}
|
||||
goto output;
|
||||
}
|
||||
|
@ -532,7 +532,7 @@ const size_t uclogic_rdesc_twha60_fixed1_size =
|
||||
sizeof(uclogic_rdesc_twha60_fixed1_arr);
|
||||
|
||||
/* Fixed report descriptor template for (tweaked) v1 pen reports */
|
||||
const __u8 uclogic_rdesc_pen_v1_template_arr[] = {
|
||||
const __u8 uclogic_rdesc_v1_pen_template_arr[] = {
|
||||
0x05, 0x0D, /* Usage Page (Digitizer), */
|
||||
0x09, 0x02, /* Usage (Pen), */
|
||||
0xA1, 0x01, /* Collection (Application), */
|
||||
@ -582,11 +582,11 @@ const __u8 uclogic_rdesc_pen_v1_template_arr[] = {
|
||||
0xC0 /* End Collection */
|
||||
};
|
||||
|
||||
const size_t uclogic_rdesc_pen_v1_template_size =
|
||||
sizeof(uclogic_rdesc_pen_v1_template_arr);
|
||||
const size_t uclogic_rdesc_v1_pen_template_size =
|
||||
sizeof(uclogic_rdesc_v1_pen_template_arr);
|
||||
|
||||
/* Fixed report descriptor template for (tweaked) v2 pen reports */
|
||||
const __u8 uclogic_rdesc_pen_v2_template_arr[] = {
|
||||
const __u8 uclogic_rdesc_v2_pen_template_arr[] = {
|
||||
0x05, 0x0D, /* Usage Page (Digitizer), */
|
||||
0x09, 0x02, /* Usage (Pen), */
|
||||
0xA1, 0x01, /* Collection (Application), */
|
||||
@ -648,8 +648,8 @@ const __u8 uclogic_rdesc_pen_v2_template_arr[] = {
|
||||
0xC0 /* End Collection */
|
||||
};
|
||||
|
||||
const size_t uclogic_rdesc_pen_v2_template_size =
|
||||
sizeof(uclogic_rdesc_pen_v2_template_arr);
|
||||
const size_t uclogic_rdesc_v2_pen_template_size =
|
||||
sizeof(uclogic_rdesc_v2_pen_template_arr);
|
||||
|
||||
/*
|
||||
* Expand to the contents of a generic frame report descriptor.
|
||||
@ -699,18 +699,18 @@ const size_t uclogic_rdesc_pen_v2_template_size =
|
||||
0xC0 /* End Collection */
|
||||
|
||||
/* Fixed report descriptor for (tweaked) v1 frame reports */
|
||||
const __u8 uclogic_rdesc_frame_v1_arr[] = {
|
||||
UCLOGIC_RDESC_FRAME_BYTES(UCLOGIC_RDESC_FRAME_V1_ID, 8)
|
||||
const __u8 uclogic_rdesc_v1_frame_arr[] = {
|
||||
UCLOGIC_RDESC_FRAME_BYTES(UCLOGIC_RDESC_V1_FRAME_ID, 8)
|
||||
};
|
||||
const size_t uclogic_rdesc_frame_v1_size =
|
||||
sizeof(uclogic_rdesc_frame_v1_arr);
|
||||
const size_t uclogic_rdesc_v1_frame_size =
|
||||
sizeof(uclogic_rdesc_v1_frame_arr);
|
||||
|
||||
/* Fixed report descriptor for (tweaked) v2 frame reports */
|
||||
const __u8 uclogic_rdesc_frame_v2_arr[] = {
|
||||
UCLOGIC_RDESC_FRAME_BYTES(UCLOGIC_RDESC_FRAME_V2_ID, 12)
|
||||
const __u8 uclogic_rdesc_v2_frame_arr[] = {
|
||||
UCLOGIC_RDESC_FRAME_BYTES(UCLOGIC_RDESC_V2_FRAME_ID, 12)
|
||||
};
|
||||
const size_t uclogic_rdesc_frame_v2_size =
|
||||
sizeof(uclogic_rdesc_frame_v2_arr);
|
||||
const size_t uclogic_rdesc_v2_frame_size =
|
||||
sizeof(uclogic_rdesc_v2_frame_arr);
|
||||
|
||||
/* Fixed report descriptor for Ugee EX07 frame */
|
||||
const __u8 uclogic_rdesc_ugee_ex07_frame_arr[] = {
|
||||
|
@ -104,32 +104,32 @@ enum uclogic_rdesc_pen_ph_id {
|
||||
UCLOGIC_RDESC_PH_HEAD, UCLOGIC_RDESC_PEN_PH_ID_##_ID
|
||||
|
||||
/* Report ID for v1 pen reports */
|
||||
#define UCLOGIC_RDESC_PEN_V1_ID 0x07
|
||||
#define UCLOGIC_RDESC_V1_PEN_ID 0x07
|
||||
|
||||
/* Fixed report descriptor template for (tweaked) v1 pen reports */
|
||||
extern const __u8 uclogic_rdesc_pen_v1_template_arr[];
|
||||
extern const size_t uclogic_rdesc_pen_v1_template_size;
|
||||
extern const __u8 uclogic_rdesc_v1_pen_template_arr[];
|
||||
extern const size_t uclogic_rdesc_v1_pen_template_size;
|
||||
|
||||
/* Report ID for v2 pen reports */
|
||||
#define UCLOGIC_RDESC_PEN_V2_ID 0x08
|
||||
#define UCLOGIC_RDESC_V2_PEN_ID 0x08
|
||||
|
||||
/* Fixed report descriptor template for (tweaked) v2 pen reports */
|
||||
extern const __u8 uclogic_rdesc_pen_v2_template_arr[];
|
||||
extern const size_t uclogic_rdesc_pen_v2_template_size;
|
||||
extern const __u8 uclogic_rdesc_v2_pen_template_arr[];
|
||||
extern const size_t uclogic_rdesc_v2_pen_template_size;
|
||||
|
||||
/* Fixed report descriptor for (tweaked) v1 frame reports */
|
||||
extern const __u8 uclogic_rdesc_frame_v1_arr[];
|
||||
extern const size_t uclogic_rdesc_frame_v1_size;
|
||||
extern const __u8 uclogic_rdesc_v1_frame_arr[];
|
||||
extern const size_t uclogic_rdesc_v1_frame_size;
|
||||
|
||||
/* Report ID for tweaked v1 frame reports */
|
||||
#define UCLOGIC_RDESC_FRAME_V1_ID 0xf7
|
||||
#define UCLOGIC_RDESC_V1_FRAME_ID 0xf7
|
||||
|
||||
/* Fixed report descriptor for (tweaked) v2 frame reports */
|
||||
extern const __u8 uclogic_rdesc_frame_v2_arr[];
|
||||
extern const size_t uclogic_rdesc_frame_v2_size;
|
||||
extern const __u8 uclogic_rdesc_v2_frame_arr[];
|
||||
extern const size_t uclogic_rdesc_v2_frame_size;
|
||||
|
||||
/* Report ID for tweaked v2 frame reports */
|
||||
#define UCLOGIC_RDESC_FRAME_V2_ID 0xf7
|
||||
#define UCLOGIC_RDESC_V2_FRAME_ID 0xf7
|
||||
|
||||
/* Fixed report descriptor for Ugee EX07 frame */
|
||||
extern const __u8 uclogic_rdesc_ugee_ex07_frame_arr[];
|
||||
|
Loading…
Reference in New Issue
Block a user