Lines Matching +full:pen +full:- +full:up

1 // SPDX-License-Identifier: GPL-2.0+
3 * HID driver for UC-Logic devices not fully compliant with HID standard
4 * - tablet initialization and parameter retrieval
16 #include "hid-uclogic-params.h"
17 #include "hid-uclogic-rdesc.h"
19 #include "hid-ids.h"
25 * uclogic_params_pen_inrange_to_str() - Convert a pen in-range reporting type
27 * @inrange: The in-range reporting type to convert.
49 * uclogic_params_pen_hid_dbg() - Dump tablet interface pen parameters
50 * @hdev: The HID device the pen parameters describe.
51 * @pen: The pen parameters to dump.
53 * Dump tablet interface pen parameters with hid_dbg(). The dump is indented
57 const struct uclogic_params_pen *pen) in uclogic_params_pen_hid_dbg() argument
62 (pen->usage_invalid ? "true" : "false")); in uclogic_params_pen_hid_dbg()
63 hid_dbg(hdev, "\t.desc_ptr = %p\n", pen->desc_ptr); in uclogic_params_pen_hid_dbg()
64 hid_dbg(hdev, "\t.desc_size = %u\n", pen->desc_size); in uclogic_params_pen_hid_dbg()
65 hid_dbg(hdev, "\t.id = %u\n", pen->id); in uclogic_params_pen_hid_dbg()
67 for (i = 0; i < ARRAY_SIZE(pen->subreport_list); i++) { in uclogic_params_pen_hid_dbg()
69 pen->subreport_list[i].value, in uclogic_params_pen_hid_dbg()
70 pen->subreport_list[i].id, in uclogic_params_pen_hid_dbg()
71 i < (ARRAY_SIZE(pen->subreport_list) - 1) ? "," : ""); in uclogic_params_pen_hid_dbg()
75 uclogic_params_pen_inrange_to_str(pen->inrange)); in uclogic_params_pen_hid_dbg()
77 (pen->fragmented_hires ? "true" : "false")); in uclogic_params_pen_hid_dbg()
79 (pen->tilt_y_flipped ? "true" : "false")); in uclogic_params_pen_hid_dbg()
83 * uclogic_params_frame_hid_dbg() - Dump tablet interface frame parameters
84 * @hdev: The HID device the pen parameters describe.
94 hid_dbg(hdev, "\t\t.desc_ptr = %p\n", frame->desc_ptr); in uclogic_params_frame_hid_dbg()
95 hid_dbg(hdev, "\t\t.desc_size = %u\n", frame->desc_size); in uclogic_params_frame_hid_dbg()
96 hid_dbg(hdev, "\t\t.id = %u\n", frame->id); in uclogic_params_frame_hid_dbg()
97 hid_dbg(hdev, "\t\t.suffix = %s\n", frame->suffix); in uclogic_params_frame_hid_dbg()
98 hid_dbg(hdev, "\t\t.re_lsb = %u\n", frame->re_lsb); in uclogic_params_frame_hid_dbg()
99 hid_dbg(hdev, "\t\t.dev_id_byte = %u\n", frame->dev_id_byte); in uclogic_params_frame_hid_dbg()
100 hid_dbg(hdev, "\t\t.touch_byte = %u\n", frame->touch_byte); in uclogic_params_frame_hid_dbg()
101 hid_dbg(hdev, "\t\t.touch_max = %hhd\n", frame->touch_max); in uclogic_params_frame_hid_dbg()
103 frame->touch_flip_at); in uclogic_params_frame_hid_dbg()
105 frame->bitmap_dial_byte); in uclogic_params_frame_hid_dbg()
109 * uclogic_params_hid_dbg() - Dump tablet interface parameters
121 params->invalid ? "true" : "false"); in uclogic_params_hid_dbg()
122 hid_dbg(hdev, ".desc_ptr = %p\n", params->desc_ptr); in uclogic_params_hid_dbg()
123 hid_dbg(hdev, ".desc_size = %u\n", params->desc_size); in uclogic_params_hid_dbg()
124 hid_dbg(hdev, ".pen = {\n"); in uclogic_params_hid_dbg()
125 uclogic_params_pen_hid_dbg(hdev, &params->pen); in uclogic_params_hid_dbg()
128 for (i = 0; i < ARRAY_SIZE(params->frame_list); i++) { in uclogic_params_hid_dbg()
130 uclogic_params_frame_hid_dbg(hdev, &params->frame_list[i]); in uclogic_params_hid_dbg()
132 i < (ARRAY_SIZE(params->frame_list) - 1) ? "," : ""); in uclogic_params_hid_dbg()
138 * uclogic_params_get_str_desc - retrieve a string descriptor from a HID
139 * device interface, putting it into a kmalloc-allocated buffer as is, without
142 * @pbuf: Location for the kmalloc-allocated buffer pointer containing
152 * -EPIPE, if the descriptor was not found, or
164 rc = -EINVAL; in uclogic_params_get_str_desc()
172 rc = -ENOMEM; in uclogic_params_get_str_desc()
181 if (rc == -EPIPE) { in uclogic_params_get_str_desc()
202 * uclogic_params_pen_cleanup - free resources used by struct
203 * uclogic_params_pen (tablet interface's pen input parameters).
206 * @pen: Pen input parameters to cleanup. Cannot be NULL.
208 static void uclogic_params_pen_cleanup(struct uclogic_params_pen *pen) in uclogic_params_pen_cleanup() argument
210 kfree(pen->desc_ptr); in uclogic_params_pen_cleanup()
211 memset(pen, 0, sizeof(*pen)); in uclogic_params_pen_cleanup()
215 * uclogic_params_pen_init_v1() - initialize tablet interface pen
218 * @pen: Pointer to the pen parameters to initialize (to be
219 * cleaned up with uclogic_params_pen_cleanup()). Not modified in
230 static int uclogic_params_pen_init_v1(struct uclogic_params_pen *pen, in uclogic_params_pen_init_v1() argument
241 /* Pen report descriptor template parameters */ in uclogic_params_pen_init_v1()
246 if (pen == NULL || pfound == NULL || hdev == NULL) { in uclogic_params_pen_init_v1()
247 rc = -EINVAL; in uclogic_params_pen_init_v1()
252 * Read string descriptor containing pen input parameters. in uclogic_params_pen_init_v1()
255 * NOTE: This enables fully-functional tablet mode. in uclogic_params_pen_init_v1()
258 if (rc == -EPIPE) { in uclogic_params_pen_init_v1()
260 "string descriptor with pen parameters not found, assuming not compatible\n"); in uclogic_params_pen_init_v1()
263 hid_err(hdev, "failed retrieving pen parameters: %d\n", rc); in uclogic_params_pen_init_v1()
267 …"string descriptor with pen parameters has invalid length (got %d, expected %d), assuming not comp… in uclogic_params_pen_init_v1()
297 * Generate pen report descriptor in uclogic_params_pen_init_v1()
304 rc = -ENOMEM; in uclogic_params_pen_init_v1()
309 * Fill-in the parameters in uclogic_params_pen_init_v1()
311 memset(pen, 0, sizeof(*pen)); in uclogic_params_pen_init_v1()
312 pen->desc_ptr = desc_ptr; in uclogic_params_pen_init_v1()
314 pen->desc_size = uclogic_rdesc_v1_pen_template_size; in uclogic_params_pen_init_v1()
315 pen->id = UCLOGIC_RDESC_V1_PEN_ID; in uclogic_params_pen_init_v1()
316 pen->inrange = UCLOGIC_PARAMS_PEN_INRANGE_INVERTED; in uclogic_params_pen_init_v1()
328 * uclogic_params_get_le24() - get a 24-bit little-endian number from a
343 * uclogic_params_pen_init_v2() - initialize tablet interface pen
346 * @pen: Pointer to the pen parameters to initialize (to be
347 * cleaned up with uclogic_params_pen_cleanup()). Not
368 static int uclogic_params_pen_init_v2(struct uclogic_params_pen *pen, in uclogic_params_pen_init_v2() argument
386 /* Pen report descriptor template parameters */ in uclogic_params_pen_init_v2()
391 if (pen == NULL || pfound == NULL || hdev == NULL) { in uclogic_params_pen_init_v2()
392 rc = -EINVAL; in uclogic_params_pen_init_v2()
397 * Read string descriptor containing pen input parameters. in uclogic_params_pen_init_v2()
400 * NOTE: This enables fully-functional tablet mode. in uclogic_params_pen_init_v2()
403 if (rc == -EPIPE) { in uclogic_params_pen_init_v2()
405 "string descriptor with pen parameters not found, assuming not compatible\n"); in uclogic_params_pen_init_v2()
408 hid_err(hdev, "failed retrieving pen parameters: %d\n", rc); in uclogic_params_pen_init_v2()
412 …"string descriptor with pen parameters is too short (got %d, expected at least %d), assuming not c… in uclogic_params_pen_init_v2()
420 * Check it's not just a catch-all UTF-16LE-encoded ASCII in uclogic_params_pen_init_v2()
430 "string descriptor with pen parameters seems to contain only text, assuming not compatible\n"); in uclogic_params_pen_init_v2()
457 * Generate pen report descriptor in uclogic_params_pen_init_v2()
464 rc = -ENOMEM; in uclogic_params_pen_init_v2()
469 * Fill-in the parameters in uclogic_params_pen_init_v2()
471 memset(pen, 0, sizeof(*pen)); in uclogic_params_pen_init_v2()
472 pen->desc_ptr = desc_ptr; in uclogic_params_pen_init_v2()
474 pen->desc_size = uclogic_rdesc_v2_pen_template_size; in uclogic_params_pen_init_v2()
475 pen->id = UCLOGIC_RDESC_V2_PEN_ID; in uclogic_params_pen_init_v2()
476 pen->inrange = UCLOGIC_PARAMS_PEN_INRANGE_NONE; in uclogic_params_pen_init_v2()
477 pen->fragmented_hires = true; in uclogic_params_pen_init_v2()
478 pen->tilt_y_flipped = true; in uclogic_params_pen_init_v2()
497 * uclogic_params_frame_cleanup - free resources used by struct
505 kfree(frame->desc_ptr); in uclogic_params_frame_cleanup()
510 * uclogic_params_frame_init_with_desc() - initialize tablet's frame control
514 * up with uclogic_params_frame_cleanup()). Not modified in case
533 return -EINVAL; in uclogic_params_frame_init_with_desc()
537 return -ENOMEM; in uclogic_params_frame_init_with_desc()
540 frame->desc_ptr = copy_desc_ptr; in uclogic_params_frame_init_with_desc()
541 frame->desc_size = desc_size; in uclogic_params_frame_init_with_desc()
542 frame->id = id; in uclogic_params_frame_init_with_desc()
547 * uclogic_params_frame_init_v1() - initialize v1 tablet interface frame
551 * up with uclogic_params_frame_cleanup()). Not modified in case
574 rc = -EINVAL; in uclogic_params_frame_init_v1()
585 rc = -ENOMEM; in uclogic_params_frame_init_v1()
590 if (rc == -EPIPE) { in uclogic_params_frame_init_v1()
592 "generic button -enabling string descriptor not found\n"); in uclogic_params_frame_init_v1()
619 * uclogic_params_cleanup_event_hooks - free resources used by the list of raw
629 if (!params || !params->event_hooks) in uclogic_params_cleanup_event_hooks()
632 list_for_each_entry_safe(curr, n, &params->event_hooks->list, list) { in uclogic_params_cleanup_event_hooks()
633 cancel_work_sync(&curr->work); in uclogic_params_cleanup_event_hooks()
634 list_del(&curr->list); in uclogic_params_cleanup_event_hooks()
635 kfree(curr->event); in uclogic_params_cleanup_event_hooks()
639 kfree(params->event_hooks); in uclogic_params_cleanup_event_hooks()
640 params->event_hooks = NULL; in uclogic_params_cleanup_event_hooks()
644 * uclogic_params_cleanup - free resources used by struct uclogic_params
652 if (!params->invalid) { in uclogic_params_cleanup()
654 kfree(params->desc_ptr); in uclogic_params_cleanup()
655 uclogic_params_pen_cleanup(&params->pen); in uclogic_params_cleanup()
656 for (i = 0; i < ARRAY_SIZE(params->frame_list); i++) in uclogic_params_cleanup()
657 uclogic_params_frame_cleanup(&params->frame_list[i]); in uclogic_params_cleanup()
665 * uclogic_params_get_desc() - Get a replacement report descriptor for a
670 * @pdesc: Location for the resulting, kmalloc-allocated report
680 * -EINVAL, if invalid arguments are supplied.
681 * -ENOMEM, if failed to allocate memory.
687 int rc = -ENOMEM; in uclogic_params_get_desc()
695 return -EINVAL; in uclogic_params_get_desc()
716 ADD_DESC(params->desc_ptr, params->desc_size); in uclogic_params_get_desc()
717 ADD_DESC(params->pen.desc_ptr, params->pen.desc_size); in uclogic_params_get_desc()
718 for (i = 0; i < ARRAY_SIZE(params->frame_list); i++) { in uclogic_params_get_desc()
719 ADD_DESC(params->frame_list[i].desc_ptr, in uclogic_params_get_desc()
720 params->frame_list[i].desc_size); in uclogic_params_get_desc()
737 * uclogic_params_init_invalid() - initialize tablet interface parameters,
745 params->invalid = true; in uclogic_params_init_invalid()
749 * uclogic_params_init_with_opt_desc() - initialize tablet interface
766 * Zero, if successful. -EINVAL if an invalid argument was passed.
767 * -ENOMEM, if failed to allocate memory.
782 rc = -EINVAL; in uclogic_params_init_with_opt_desc()
787 if (hdev->dev_rsize == orig_desc_size) { in uclogic_params_init_with_opt_desc()
792 rc = -ENOMEM; in uclogic_params_init_with_opt_desc()
799 hdev->dev_rsize, orig_desc_size); in uclogic_params_init_with_opt_desc()
806 params->desc_ptr = desc_copy_ptr; in uclogic_params_init_with_opt_desc()
808 params->desc_size = desc_copy_size; in uclogic_params_init_with_opt_desc()
817 * uclogic_params_huion_init() - initialize a Huion tablet interface and discover
853 rc = -EINVAL; in uclogic_params_huion_init()
858 iface = to_usb_interface(hdev->dev.parent); in uclogic_params_huion_init()
859 bInterfaceNumber = iface->cur_altsetting->desc.bInterfaceNumber; in uclogic_params_huion_init()
863 /* Keep everything intact, but mark pen usage invalid */ in uclogic_params_huion_init()
864 p.pen.usage_invalid = true; in uclogic_params_huion_init()
866 /* Else, if it's not a pen interface */ in uclogic_params_huion_init()
875 rc = -ENOMEM; in uclogic_params_huion_init()
879 if (rc == -EPIPE) { in uclogic_params_huion_init()
888 strscpy(hdev->uniq, ver_ptr, sizeof(hdev->uniq)); in uclogic_params_huion_init()
893 "transition firmware detected, not probing pen v2 parameters\n"); in uclogic_params_huion_init()
895 /* Try to probe v2 pen parameters */ in uclogic_params_huion_init()
896 rc = uclogic_params_pen_init_v2(&p.pen, &found, in uclogic_params_huion_init()
901 "failed probing pen v2 parameters: %d\n", rc); in uclogic_params_huion_init()
904 hid_dbg(hdev, "pen v2 parameters found\n"); in uclogic_params_huion_init()
918 /* Link from pen sub-report */ in uclogic_params_huion_init()
919 p.pen.subreport_list[0].value = 0xe0; in uclogic_params_huion_init()
920 p.pen.subreport_list[0].id = in uclogic_params_huion_init()
966 /* Link from pen sub-report */ in uclogic_params_huion_init()
967 p.pen.subreport_list[1].value = 0xf0; in uclogic_params_huion_init()
968 p.pen.subreport_list[1].id = in uclogic_params_huion_init()
988 /* Link from pen sub-report */ in uclogic_params_huion_init()
989 p.pen.subreport_list[2].value = 0xf1; in uclogic_params_huion_init()
990 p.pen.subreport_list[2].id = in uclogic_params_huion_init()
995 hid_dbg(hdev, "pen v2 parameters not found\n"); in uclogic_params_huion_init()
998 /* Try to probe v1 pen parameters */ in uclogic_params_huion_init()
999 rc = uclogic_params_pen_init_v1(&p.pen, &found, hdev); in uclogic_params_huion_init()
1002 "failed probing pen v1 parameters: %d\n", rc); in uclogic_params_huion_init()
1005 hid_dbg(hdev, "pen v1 parameters found\n"); in uclogic_params_huion_init()
1016 /* Link frame button subreports from pen reports */ in uclogic_params_huion_init()
1017 p.pen.subreport_list[0].value = 0xe0; in uclogic_params_huion_init()
1018 p.pen.subreport_list[0].id = in uclogic_params_huion_init()
1023 hid_dbg(hdev, "pen v1 parameters not found\n"); in uclogic_params_huion_init()
1040 * uclogic_probe_interface() - some tablets, like the Parblo A610 PLUS V2 or
1041 * the XP-PEN Deco Mini 7, need to be initialized by sending them magic data.
1063 rc = -EINVAL; in uclogic_probe_interface()
1069 rc = -ENOMEM; in uclogic_probe_interface()
1079 rc = -1; in uclogic_probe_interface()
1090 * uclogic_params_parse_ugee_v2_desc - parse the string descriptor containing
1091 * pen and frame parameters returned by UGEE v2 devices.
1118 return -EINVAL; in uclogic_params_parse_ugee_v2_desc()
1121 return -EINVAL; in uclogic_params_parse_ugee_v2_desc()
1149 * uclogic_params_ugee_v2_init_frame_buttons() - initialize a UGEE v2 frame with
1166 return -EINVAL; in uclogic_params_ugee_v2_init_frame_buttons()
1173 return -ENOMEM; in uclogic_params_ugee_v2_init_frame_buttons()
1175 rc = uclogic_params_frame_init_with_desc(&p->frame_list[0], in uclogic_params_ugee_v2_init_frame_buttons()
1184 * uclogic_params_ugee_v2_init_frame_dial() - initialize a UGEE v2 frame with a
1201 return -EINVAL; in uclogic_params_ugee_v2_init_frame_dial()
1208 return -ENOMEM; in uclogic_params_ugee_v2_init_frame_dial()
1210 rc = uclogic_params_frame_init_with_desc(&p->frame_list[0], in uclogic_params_ugee_v2_init_frame_dial()
1218 p->frame_list[0].bitmap_dial_byte = 7; in uclogic_params_ugee_v2_init_frame_dial()
1223 * uclogic_params_ugee_v2_init_frame_mouse() - initialize a UGEE v2 frame with a
1235 return -EINVAL; in uclogic_params_ugee_v2_init_frame_mouse()
1237 rc = uclogic_params_frame_init_with_desc(&p->frame_list[1], in uclogic_params_ugee_v2_init_frame_mouse()
1245 * uclogic_params_ugee_v2_has_battery() - check whether a UGEE v2 device has
1256 if (drvdata->quirks & UCLOGIC_BATTERY_QUIRK) in uclogic_params_ugee_v2_has_battery()
1259 /* The XP-PEN Deco LW vendor, product and version are identical to the in uclogic_params_ugee_v2_has_battery()
1264 if (hdev->vendor == USB_VENDOR_ID_UGEE && in uclogic_params_ugee_v2_has_battery()
1265 hdev->product == USB_DEVICE_ID_UGEE_XPPEN_TABLET_DECO_L) { in uclogic_params_ugee_v2_has_battery()
1268 if (strstarts(udev->product, "Deco LW")) in uclogic_params_ugee_v2_has_battery()
1276 * uclogic_params_ugee_v2_init_battery() - initialize UGEE v2 battery reporting.
1289 return -EINVAL; in uclogic_params_ugee_v2_init_battery()
1291 /* Some tablets contain invalid characters in hdev->uniq, throwing a in uclogic_params_ugee_v2_init_battery()
1295 snprintf(hdev->uniq, sizeof(hdev->uniq), "%x-%x", hdev->vendor, in uclogic_params_ugee_v2_init_battery()
1296 hdev->product); in uclogic_params_ugee_v2_init_battery()
1298 rc = uclogic_params_frame_init_with_desc(&p->frame_list[1], in uclogic_params_ugee_v2_init_battery()
1305 p->frame_list[1].suffix = "Battery"; in uclogic_params_ugee_v2_init_battery()
1306 p->pen.subreport_list[1].value = 0xf2; in uclogic_params_ugee_v2_init_battery()
1307 p->pen.subreport_list[1].id = UCLOGIC_RDESC_UGEE_V2_BATTERY_ID; in uclogic_params_ugee_v2_init_battery()
1313 * uclogic_params_ugee_v2_reconnect_work() - When a wireless tablet looses
1325 uclogic_probe_interface(event_hook->hdev, uclogic_ugee_v2_probe_arr, in uclogic_params_ugee_v2_reconnect_work()
1331 * uclogic_params_ugee_v2_init_event_hooks() - initialize the list of events
1350 return -EINVAL; in uclogic_params_ugee_v2_init_event_hooks()
1356 p->event_hooks = kzalloc(sizeof(*p->event_hooks), GFP_KERNEL); in uclogic_params_ugee_v2_init_event_hooks()
1357 if (!p->event_hooks) in uclogic_params_ugee_v2_init_event_hooks()
1358 return -ENOMEM; in uclogic_params_ugee_v2_init_event_hooks()
1360 INIT_LIST_HEAD(&p->event_hooks->list); in uclogic_params_ugee_v2_init_event_hooks()
1364 return -ENOMEM; in uclogic_params_ugee_v2_init_event_hooks()
1366 INIT_WORK(&event_hook->work, uclogic_params_ugee_v2_reconnect_work); in uclogic_params_ugee_v2_init_event_hooks()
1367 event_hook->hdev = hdev; in uclogic_params_ugee_v2_init_event_hooks()
1368 event_hook->size = ARRAY_SIZE(reconnect_event); in uclogic_params_ugee_v2_init_event_hooks()
1369 event_hook->event = kmemdup(reconnect_event, event_hook->size, GFP_KERNEL); in uclogic_params_ugee_v2_init_event_hooks()
1370 if (!event_hook->event) in uclogic_params_ugee_v2_init_event_hooks()
1371 return -ENOMEM; in uclogic_params_ugee_v2_init_event_hooks()
1373 list_add_tail(&event_hook->list, &p->event_hooks->list); in uclogic_params_ugee_v2_init_event_hooks()
1379 * uclogic_params_ugee_v2_init() - initialize a UGEE graphics tablets by
1413 rc = -EINVAL; in uclogic_params_ugee_v2_init()
1418 iface = to_usb_interface(hdev->dev.parent); in uclogic_params_ugee_v2_init()
1419 bInterfaceNumber = iface->cur_altsetting->desc.bInterfaceNumber; in uclogic_params_ugee_v2_init()
1448 * Read the string descriptor containing pen and frame parameters. in uclogic_params_ugee_v2_init()
1454 hid_err(hdev, "failed retrieving pen and frame parameters: %d\n", rc); in uclogic_params_ugee_v2_init()
1469 /* Initialize the pen interface */ in uclogic_params_ugee_v2_init()
1475 rc = -ENOMEM; in uclogic_params_ugee_v2_init()
1479 p.pen.desc_ptr = rdesc_pen; in uclogic_params_ugee_v2_init()
1480 p.pen.desc_size = uclogic_rdesc_ugee_v2_pen_template_size; in uclogic_params_ugee_v2_init()
1481 p.pen.id = 0x02; in uclogic_params_ugee_v2_init()
1482 p.pen.subreport_list[0].value = 0xf0; in uclogic_params_ugee_v2_init()
1483 p.pen.subreport_list[0].id = UCLOGIC_RDESC_V1_FRAME_ID; in uclogic_params_ugee_v2_init()
1486 if (drvdata->quirks & UCLOGIC_MOUSE_FRAME_QUIRK) in uclogic_params_ugee_v2_init()
1533 * uclogic_params_init() - initialize a tablet interface and discover its
1540 * parameters from. Cannot be NULL. Must be using the USB low-level
1560 rc = -EINVAL; in uclogic_params_init()
1565 bNumInterfaces = udev->config->desc.bNumInterfaces; in uclogic_params_init()
1566 iface = to_usb_interface(hdev->dev.parent); in uclogic_params_init()
1567 bInterfaceNumber = iface->cur_altsetting->desc.bInterfaceNumber; in uclogic_params_init()
1602 switch (VID_PID(hdev->vendor, hdev->product)) { in uclogic_params_init()
1617 if (hdev->dev_rsize == UCLOGIC_RDESC_WP5540U_V2_ORIG_SIZE) { in uclogic_params_init()
1619 /* Try to probe v1 pen parameters */ in uclogic_params_init()
1620 rc = uclogic_params_pen_init_v1(&p.pen, in uclogic_params_init()
1624 "pen probing failed: %d\n", in uclogic_params_init()
1630 "pen parameters not found"); in uclogic_params_init()
1676 * If it is not a three-interface version, which is known to in uclogic_params_init()
1729 /* If this is the pen interface */ in uclogic_params_init()
1731 /* Probe v1 pen parameters */ in uclogic_params_init()
1732 rc = uclogic_params_pen_init_v1(&p.pen, &found, hdev); in uclogic_params_init()
1734 hid_err(hdev, "pen probing failed: %d\n", rc); in uclogic_params_init()
1738 hid_warn(hdev, "pen parameters not found"); in uclogic_params_init()
1747 /* If this is the pen and frame interface */ in uclogic_params_init()
1749 /* Probe v1 pen parameters */ in uclogic_params_init()
1750 rc = uclogic_params_pen_init_v1(&p.pen, &found, hdev); in uclogic_params_init()
1752 hid_err(hdev, "pen probing failed: %d\n", rc); in uclogic_params_init()
1787 /* Ignore non-pen interfaces */ in uclogic_params_init()
1793 rc = uclogic_params_pen_init_v1(&p.pen, &found, hdev); in uclogic_params_init()
1795 hid_err(hdev, "pen probing failed: %d\n", rc); in uclogic_params_init()
1814 hid_warn(hdev, "pen parameters not found"); in uclogic_params_init()
1821 /* Ignore non-pen interfaces */ in uclogic_params_init()
1827 rc = uclogic_params_pen_init_v1(&p.pen, &found, hdev); in uclogic_params_init()
1829 hid_err(hdev, "pen probing failed: %d\n", rc); in uclogic_params_init()
1844 hid_warn(hdev, "pen parameters not found"); in uclogic_params_init()
1864 #include "hid-uclogic-params-test.c"