Skip to content

HID: fix for generic input processing

Benjamin Tissoires linux-doc linux-input lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest12 patches 10 repliesIn review
  2. v112 patches 7 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12HID: core: statically allocate read buffersdrivers/hid/hid-core.c include/linux/hid.h+6 -70 replies
2/12HID: core: de-duplicate some code in hid_input_field()drivers/hid/hid-core.c+39 -150 replies
3/12HID: core: split data fetching from processing in hid_input_field()drivers/hid/hid-core.c include/linux/hid.h+79 -200 replies
4/12HID: input: tag touchscreens as such if the physical is not theredrivers/hid/hid-input.c+25 -40 replies
5/12HID: input: rework spaghetti code with switch statementsdrivers/hid/hid-input.c+43 -370 replies
6/12HID: input: move up out-of-range processing of input valuesdrivers/hid/hid-input.c+24 -240 replies
7/12HID: compute an ordered list of input fields to processdrivers/hid/hid-core.c include/linux/hid.h+114 -10 replies
8/12HID: core: for input reports, process the usages by priority listdrivers/hid/hid-core.c+38 -70 replies
9/12HID: input: enforce Invert usage to be processed before InRangedrivers/hid/hid-input.c include/linux/hid.h+35 -30 replies
10/12HID: input: remove the need for HID_QUIRK_INVERTdrivers/hid/hid-input.c include/linux/hid.h+95 -98 replies
11/12HID: input: accommodate priorities for slotted devicesdrivers/hid/hid-input.c include/linux/hid.h+96 -80 replies
12/12Input: docs: add more details on the use of BTN_TOOLDocumentation/input/event-codes.rst+5 -11 reply

Reviews trailers per patch

2 of 12 patches have a Reviewed-by or Acked-by.

PatchPing ChengPeter Hutterer
1/12
2/12
3/12
4/12
5/12
6/12
7/12
8/12
9/12
10/12R-b R-b T-b
11/12
12/12A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 00/12] HID: fix for generic input processing

Hi,

this is the v2 of my series which reworks the HID report processing.

I took Ping's comments into account, and amended my MR with the regression tests[0].
More specifically, the tests (and thus this new version of the series) enforces that only one BTN_TOOL_* event gets forwarded between each EV_SYN frame, and that BTN_TOUCH are properly translated too.

This also magivally solved some worrying transitions we had in the pen state machine where the pen was jumping from "eraser" to "in contact". This new behavior enforces a "out-of-range" state in the middle, making it easier for userspace to understand now.

Again, tests are welcome :)

Cheers,
Benjamin

[0] https://gitlab.freedesktop.org/libevdev/hid-tools/-/merge_requests/127

Benjamin Tissoires (12):
HID: core: statically allocate read buffers
HID: core: de-duplicate some code in hid_input_field()
HID: core: split data fetching from processing in hid_input_field()
HID: input: tag touchscreens as such if the physical is not there
HID: input: rework spaghetti code with switch statements
HID: input: move up out-of-range processing of input values
HID: compute an ordered list of input fields to process
HID: core: for input reports, process the usages by priority list
HID: input: enforce Invert usage to be processed before InRange
HID: input: remove the need for HID_QUIRK_INVERT
HID: input: accommodate priorities for slotted devices
Input: docs: add more details on the use of BTN_TOOL

 Documentation/input/event-codes.rst |   6 +-
 drivers/hid/hid-core.c              | 280 ++++++++++++++++++---
 drivers/hid/hid-input.c             | 364 ++++++++++++++++++++++------
 include/linux/hid.h                 |  23 +-
 4 files changed, 568 insertions(+), 105 deletions(-)
Signature · 1 line
2.33.1