Lines Matching +full:abs +full:- +full:range

1 // SPDX-License-Identifier: GPL-2.0-only
18 /* Filled in by udev-hid-bpf */
33 * To switch the tablet use e.g. https://github.com/whot/huion-switcher
36 * This BPF works for both modes. The huion-switcher tool sets the
37 * HUION_FIRMWARE_ID udev property - if that is set then we disable the firmware
54 * # 0x81, 0x02, // Input (Data,Var,Abs) 15
59 * https://github.com/whot/huion-switcher
75 * # 0x09, 0x3c, // Usage (Invert) 18 <-- has no Invert eraser
80 * # 0x81, 0x02, // Input (Data,Var,Abs) 28
81 * # 0x09, 0x32, // Usage (In Range) 30
84 * # 0x81, 0x02, // Input (Data,Var,Abs) 36
85 * # 0x81, 0x03, // Input (Cnst,Var,Abs) 38
89 * # 0x55, 0x0d, // Unit Exponent (-3) 46 <-- change to -2
90 * # 0x65, 0x33, // Unit (EnglishLinear: in³) 48 <-- change in³ to in
93 * # 0x46, 0x00, 0x08, // Physical Maximum (2048) 55 <-- invalid size
96 * # 0x81, 0x02, // Input (Data,Var,Abs) 62
102 * # 0x81, 0x02, // Input (Data,Var,Abs) 75
103 * # 0x09, 0x3d, // Usage (X Tilt) 77 <-- No tilt reported
105 * # 0x15, 0x81, // Logical Minimum (-127) 81
109 * # 0x81, 0x02, // Input (Data,Var,Abs) 89
129 * # 0x81, 0x02, // Input (Data,Var,Abs) 22
136 * # 0x81, 0x00, // Input (Data,Arr,Abs) 37
148 * # 0x81, 0x00, // Input (Data,Arr,Abs) 62
171 // -- Byte 0 in report
177 // Byte 1 in report - just exists so we get to be a tablet pad
181 Input(Var|Abs)
184 // Bytes 2/3 in report - just exists so we get to be a tablet pad
190 Input(Var|Abs)
193 LogicalRange_i8(-1, 1)
203 Input(Arr|Abs)
214 // -- Byte 0 in report
218 // -- Byte 1 in report
225 Input(Var|Abs)
230 Input(Var|Abs)
236 UnitExponent(-1)
240 Input(Var|Abs) // Bytes 2+3
244 Input(Var|Abs) // Bytes 4+5
249 Input(Var|Abs) // Byte 6+7
274 Input(Var|Abs)
279 Input(Var|Abs)
285 UnitExponent(-1)
286 // Note: reported logical range differs
292 Input(Var|Abs)
297 Input(Var|Abs)
302 Input(Var|Abs)
318 Input(Var|Abs)
321 // Bytes 2/3 - x/y just exist so we get to be a tablet pad
327 Input(Var|Abs)
334 Input(Var|Abs)
340 LogicalRange_i8(-1, 1)
362 __s32 rdesc_size = hctx->size; in SEC()
374 sizeof(EXPECTED_FIRMWARE_ID) - 1) == 0; in SEC()
394 * the udev property (e.g. huion-switcher run manually) in SEC()
417 * Button 1: 03 00 05 00 00 00 00 00 -> b in SEC()
418 * Button 2: 03 00 0c 00 00 00 00 00 -> i in SEC()
419 * Button 3: 03 00 08 00 00 00 00 00 -> e in SEC()
420 * Button 4: 03 01 16 00 00 00 00 00 -> Ctrl S in SEC()
421 * Button 5: 03 00 2c 00 00 00 00 00 -> space in SEC()
422 * Button 6: 03 05 1d 00 00 00 00 00 -> Ctrl Alt Z in SEC()
424 * Wheel down: 03 01 2d 00 00 00 00 00 -> Ctrl - in SEC()
425 * Wheel up: 03 01 2e 00 00 00 00 00 -> Ctrl = in SEC()
452 wheel = -1; in SEC()
497 pad_report->report_id = PAD_REPORT_ID; in SEC()
498 pad_report->btn_stylus = 0; in SEC()
499 pad_report->x = 0; in SEC()
500 pad_report->y = 0; in SEC()
501 pad_report->buttons = last_button_state; in SEC()
502 pad_report->wheel = wheel; in SEC()
521 switch (ctx->rdesc_size) { in probe()
525 ctx->retval = 0; in probe()
528 ctx->retval = -EINVAL; in probe()