Skip to content

64-bit Digitizer Serial Numbers

Kenneth Albanowski linux-input 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3Minor cleanupdrivers/hid/hid-core.c include/linux/hid.h+9 -130 replies
2/3Enable processing of fields larger than 32 bits.Documentation/hid/hiddev.rst drivers/hid/hid-core.c drivers/hid/hid-debug.c +3 more+92 -370 replies
3/3Emit digitizer serial number through power_supplydrivers/hid/hid-input.c include/linux/hid.h+99 -60 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] 64-bit Digitizer Serial Numbers

Still as RFC, here's a patch set to implement support for 64-bit Digitizer Serial Numbers, following on to the prior discussion of how we can support Usage(Digitizers.Transducer Serial Number) larger than 32 bits.

My primary goal is making the serial number available via the power_supply node interface, and the third patch implements that: if CONFIG_HID_BATTERY_STRENGTH is enabled, and a hid report includes both Usage(Digitizers.Battery Strength) and Usage(Digitizers. Transducer Serial Number) then the generated power_supply node includes a SERIAL_NUMBER of "DG-ABCDEF..." of the last seen digitizer.

For this patch set, I have not implemented any changes to MSC_SERIAL*, however everything should be available for a future implementation. This patch set does not change any events emitted by evdev.

After some conversation with Dmitry, I am leaning towards serial number integration with the hid-multitouch protocol being the better long term solution for evdev, as that fits better with combined touch and stylus operation, as well as providing a clear means to providing multiple serial numbers for simultaneous styluses.

This set includes general modifications to hid-core to decode and represent HID fields larger than 32-bits as multiple consecutive 32-bit words, allowing arbitrarily long fields (or at least as many as can fit into HID_MAX_BUFFER_SIZE) to be passed upstream and (potentially) processed by hid-input and other subsystems.

(After trying a 64-bit implementation, I decided staying with 32-bit words kept the rest of the hid-core cleaner, and it was worth supporting arbitrary length fields instead of only upgrading from 32 -> 64.)

Kenneth Albanowski (3):
[hid] Minor cleanup
[hid] Enable processing of fields larger than 32 bits. [hid] Emit digitizer serial number through power_supply

 Documentation/hid/hiddev.rst |   6 +-
 drivers/hid/hid-core.c       |  99 +++++++++++++++++++++-----------
 drivers/hid/hid-debug.c      |  27 ++++++---
 drivers/hid/hid-input.c      | 108 +++++++++++++++++++++++++++++++++--
 include/linux/hid-debug.h    |   4 +-
 include/linux/hid.h          |  10 +++-
 6 files changed, 199 insertions(+), 55 deletions(-)
Signature · 1 line
2.31.0