linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] 64-bit Digitizer Serial Numbers
@ 2021-05-20  0:22 Kenneth Albanowski
  2021-05-20  0:22 ` [PATCH 1/3] [hid] Minor cleanup Kenneth Albanowski
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Kenneth Albanowski @ 2021-05-20  0:22 UTC (permalink / raw)
  To: open list:HID CORE LAYER
  Cc: Dmitry Torokhov, Benjamin Tissoires, Jiri Kosina, Peter Hutterer,
	Jason Gerecke, Kenneth Albanowski

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(-)

-- 
2.31.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-09-15 14:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-20  0:22 [PATCH 0/3] 64-bit Digitizer Serial Numbers Kenneth Albanowski
2021-05-20  0:22 ` [PATCH 1/3] [hid] Minor cleanup Kenneth Albanowski
2021-05-20  0:22 ` [PATCH 2/3] [hid] Enable processing of fields larger than 32 bits Kenneth Albanowski
2021-05-20  0:22 ` [PATCH 3/3] [hid] Emit digitizer serial number through power_supply Kenneth Albanowski
2021-06-09 20:52 ` [PATCH 0/3] 64-bit Digitizer Serial Numbers Kenneth Albanowski
2021-09-15 14:56 ` Jiri Kosina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).