Lines Matching +full:button +full:- +full:191
1 // SPDX-License-Identifier: GPL-2.0-only
25 * - the second button is reported through Secondary Tip Switch instead of Secondary Barrel Switch
26 * - the third button is reported through Invert, and we need some room to report it.
46 0x05, 0x09, // Usage Page (Button) /* inserted */
59 0x55, 0x0d, // Unit Exponent (-3) 48
75 0x15, 0xa6, // Logical Minimum (-90) 83
105 0x55, 0x0e, // Unit Exponent (-2) 141
128 0x75, 0x06, // Report Size (6) 191
143 0x55, 0x0e, // Unit Exponent (-2) 221
208 * This tablet reports the 3rd button through invert, but this conflict
211 * the tablet always sends an out-of-proximity event.
213 * - if there was none but the invert bit was toggled: this is the
214 * third button
215 * - if there was this out-of-proximity event, we are entering
216 * eraser mode, and we will until the next out-of-proximity.
246 /* copy the Invert bit reported for the 3rd button in bit 7 */ in SEC()
266 ctx->retval = ctx->rdesc_size != 328; in probe()
267 if (ctx->retval) in probe()
268 ctx->retval = -EINVAL; in probe()
271 if (ctx->rdesc[17] != 0x43) /* Secondary Tip Switch */ in probe()
272 ctx->retval = -EINVAL; in probe()
274 struct hid_bpf_ctx *hctx = hid_bpf_allocate_context(ctx->hid); in probe()
277 return ctx->retval = -EINVAL; in probe()
281 const char *name = hctx->hid->name; in probe()
284 if (!__builtin_memcmp(name, TEST_PREFIX, sizeof(TEST_PREFIX) - 1)) in probe()
285 name += sizeof(TEST_PREFIX) - 1; in probe()
288 ctx->retval = -EINVAL; in probe()