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
178 // Byte 1 in report - just exists so we get to be a tablet pad
182 Input(Var|Abs)
185 // Bytes 2/3 in report - just exists so we get to be a tablet pad
191 Input(Var|Abs)
194 LogicalMinimum_i8(-1)
207 Input(Arr|Abs)
218 // -- Byte 0 in report
222 // -- Byte 1 in report
230 Input(Var|Abs)
235 Input(Var|Abs)
241 UnitExponent(-1)
247 Input(Var|Abs) // Bytes 2+3
253 Input(Var|Abs) // Bytes 4+5
259 Input(Var|Abs) // Byte 6+7
285 Input(Var|Abs)
290 Input(Var|Abs)
296 UnitExponent(-1)
297 // Note: reported logical range differs
305 Input(Var|Abs)
312 Input(Var|Abs)
318 Input(Var|Abs)
335 Input(Var|Abs)
338 // Bytes 2/3 - x/y just exist so we get to be a tablet pad
344 Input(Var|Abs)
353 Input(Var|Abs)
359 LogicalMinimum_i8(-1)
382 __s32 rdesc_size = hctx->size; in SEC()
394 sizeof(EXPECTED_FIRMWARE_ID) - 1) == 0; in SEC()
414 * the udev property (e.g. huion-switcher run manually) in SEC()
437 * Button 1: 03 00 05 00 00 00 00 00 -> b in SEC()
438 * Button 2: 03 00 0c 00 00 00 00 00 -> i in SEC()
439 * Button 3: 03 00 08 00 00 00 00 00 -> e in SEC()
440 * Button 4: 03 01 16 00 00 00 00 00 -> Ctrl S in SEC()
441 * Button 5: 03 00 2c 00 00 00 00 00 -> space in SEC()
442 * Button 6: 03 05 1d 00 00 00 00 00 -> Ctrl Alt Z in SEC()
444 * Wheel down: 03 01 2d 00 00 00 00 00 -> Ctrl - in SEC()
445 * Wheel up: 03 01 2e 00 00 00 00 00 -> Ctrl = in SEC()
472 wheel = -1; in SEC()
517 pad_report->report_id = PAD_REPORT_ID; in SEC()
518 pad_report->btn_stylus = 0; in SEC()
519 pad_report->x = 0; in SEC()
520 pad_report->y = 0; in SEC()
521 pad_report->buttons = last_button_state; in SEC()
522 pad_report->wheel = wheel; in SEC()
541 switch (ctx->rdesc_size) { in probe()
545 ctx->retval = 0; in probe()
548 ctx->retval = -EINVAL; in probe()