Lines Matching +full:tablet +full:- +full:mode

1 // SPDX-License-Identifier: GPL-2.0-or-later
15 #include "hid-ids.h"
23 * tablet input mode, switching it between "default", "tablet" and "ink".
25 * This driver only uses "default" mode for all the supported tablets. This
26 * mode tries to be HID-compatible (not very successfully), but cripples the
29 * The "tablet" mode uses some proprietary, yet decipherable protocol, which
30 * represents the correct resolution, but is possibly HID-incompatible (i.e.
33 * The purpose of the "ink" mode is unknown.
35 * The feature reports needed for switching to each mode are these:
38 * 02 16 01 tablet
42 /* Size of the original report descriptor of Slim Tablet 5.8 inch */
45 /* Fixed Slim Tablet 5.8 inch descriptor */
55 0x09, 0x46, /* Usage (Tablet Pick), */
75 0x55, 0xFD, /* Unit Exponent (-3), */
93 /* Size of the original report descriptor of Slim Tablet 12.1 inch */
96 /* Fixed Slim Tablet 12.1 inch descriptor */
106 0x09, 0x46, /* Usage (Tablet Pick), */
126 0x55, 0xFD, /* Unit Exponent (-3), */
157 0x09, 0x46, /* Usage (Tablet Pick), */
177 0x55, 0xFD, /* Unit Exponent (-3), */
195 /* Size of the original report descriptor of tablet with PID 0038 */
199 * Fixed report descriptor for tablet with PID 0038.
210 0x09, 0x46, /* Usage (Tablet Pick), */
230 0x55, 0xFD, /* Unit Exponent (-3), */
248 /* Size of the original report descriptor of Media Tablet 10.6 inch */
251 /* Fixed Media Tablet 10.6 inch descriptor */
261 0x09, 0x46, /* Usage (Tablet Pick), */
281 0x55, 0xFD, /* Unit Exponent (-3), */
307 0x15, 0xFF, /* Logical Minimum (-1), */
361 /* Size of the original report descriptor of Media Tablet 14.1 inch */
364 /* Fixed Media Tablet 14.1 inch descriptor */
374 0x09, 0x46, /* Usage (Tablet Pick), */
394 0x55, 0xFD, /* Unit Exponent (-3), */
420 0x15, 0xFF, /* Logical Minimum (-1), */
472 /* Size of the original report descriptor of Sirius Battery Free Tablet */
475 /* Fixed Sirius Battery Free Tablet descriptor */
489 0x09, 0x46, /* Usage (Tablet Pick), */
503 0x55, 0xFD, /* Unit Exponent (-3), */
525 0x55, 0xFE, /* Unit Exponent (-2), */
527 0x35, 0x97, /* Physical Minimum (-105), */
529 0x15, 0x97, /* Logical Minimum (-105), */
549 0x15, 0xFF, /* Logical Minimum (-1), */
605 switch (hdev->product) { in waltop_report_fixup()
656 if (report->type == HID_INPUT_REPORT && report->id == 16 && size >= 8) { in waltop_raw_event()
670 /* If this is a pen input report of Sirius Battery Free Tablet */ in waltop_raw_event()
671 if (hdev->product == USB_DEVICE_ID_WALTOP_SIRIUS_BATTERY_FREE_TABLET && in waltop_raw_event()
672 report->type == HID_INPUT_REPORT && in waltop_raw_event()
673 report->id == 16 && in waltop_raw_event()
676 * The tablet reports tilt as roughly sin(a)*21 (18 means 60 in waltop_raw_event()
689 s8 sign_x = tilt_x >= 0 ? 1 : -1; in waltop_raw_event()
690 s8 sign_y = tilt_y >= 0 ? 1 : -1; in waltop_raw_event()
700 sign_y *= -1; in waltop_raw_event()
703 * This effectively clamps reported tilt to 60 degrees - the in waltop_raw_event()
706 if (tilt_x > ARRAY_SIZE(tilt_to_radians) - 1) in waltop_raw_event()
707 tilt_x = ARRAY_SIZE(tilt_to_radians) - 1; in waltop_raw_event()
708 if (tilt_y > ARRAY_SIZE(tilt_to_radians) - 1) in waltop_raw_event()
709 tilt_y = ARRAY_SIZE(tilt_to_radians) - 1; in waltop_raw_event()