All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v8 0/5] HID: intel-thc-hid: intel-ipts: support THC IPTS ports
@ 2026-11-18  6:57 Emfox Zhou
  2026-11-18  6:57 ` [PATCH v8 1/5] HID: intel-thc-hid: intel-ipts: bring up the port Emfox Zhou
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Emfox Zhou @ 2026-11-18  6:57 UTC (permalink / raw)
  To: Even Xu, Xinpeng Sun, Jiri Kosina, Benjamin Tissoires
  Cc: linux-input, linux-kernel

The THC ports on Tiger Lake, Lakefield, Alder Lake and Raptor Lake run in
IPTS mode: plain SPI with a private framing instead of HIDSPI, which is
all intel-thc-hid handles today. This adds a backend for them next to
intel-quickspi and intel-quicki2c, on top of the same core.

It is based on v7.4-rc3 with two core fix series applied, both still
under review:

  https://lore.kernel.org/r/20261118053132.253448-1-emfox@debian.org
  https://lore.kernel.org/r/20261117105420.318995-1-emfox@debian.org

One gives the DMA engines a lifetime, the other keeps a PRD table from
overrunning after a reset, and the recovery path here relies on both.
They overlap in intel-thc-dma.c: apply the first, then the second.

Register, DMA and interrupt work goes through the exported intel-thc API,
except in four places where the core has no call for it: the reset,
port-supported and quiesce-state bits of THC_M_PRT_CONTROL are accessed
directly. Nothing outside the new directory changes except Kconfig and
Makefile.

The hardware facts - port IDs, configuration block layout, frame codes and
header sizes - come from the ithc driver linux-surface ships, at
https://github.com/quo/ithc-linux 6d53c9c (dual licensed GPL-2.0 /
BSD-2-Clause); no code is taken from it. The layout, the frame format and
the ordering between quiesce, interrupt configuration and the DMA engines
are the parts most likely to need scrutiny; each is argued in the commit
message that relies on it. All of it was confirmed on a Surface Pro 8 with
a 045e:0c37 controller.

The first four patches each leave a state that builds and loads: port
bring-up, DMA and interrupts, HID registration, system sleep. The fifth
documents the frame format and the IPTS handshake.

Link to v7: https://lore.kernel.org/r/20261118054004.363766-1-emfox@debian.org

Changes in v8:

  - A request from the threaded handler is refused by comparing the caller
    with that thread, not through a device-wide flag.

  - The reset count a feature answer is checked against is sampled after
    the request is written.

  - The line is masked again after synchronize_irq() in the recovery path,
    and the thread no longer reopens it during a teardown.

Emfox Zhou (5):
  HID: intel-thc-hid: intel-ipts: bring up the port
  HID: intel-thc-hid: intel-ipts: receive reports
  HID: intel-thc-hid: intel-ipts: add the HID device
  HID: intel-thc-hid: intel-ipts: handle system sleep
  HID: intel-thc-hid: intel-ipts: document the IPTS mode

 Documentation/hid/intel-thc-hid.rst           | 109 +-
 drivers/hid/intel-thc-hid/Kconfig             |  14 +
 drivers/hid/intel-thc-hid/Makefile            |   4 +
 drivers/hid/intel-thc-hid/intel-ipts/ipts.c   | 982 ++++++++++++++++++
 drivers/hid/intel-thc-hid/intel-ipts/ipts.h   | 201 ++++
 .../hid/intel-thc-hid/intel-ipts/pci-ipts.c   | 193 ++++
 6 files changed, 1502 insertions(+), 1 deletion(-)
 create mode 100644 drivers/hid/intel-thc-hid/intel-ipts/ipts.c
 create mode 100644 drivers/hid/intel-thc-hid/intel-ipts/ipts.h
 create mode 100644 drivers/hid/intel-thc-hid/intel-ipts/pci-ipts.c


base-commit: aebb7274476403040d582c61478df8f4a7bf9cd3

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

end of thread, other threads:[~2026-11-18  7:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-18  6:57 [PATCH v8 0/5] HID: intel-thc-hid: intel-ipts: support THC IPTS ports Emfox Zhou
2026-11-18  6:57 ` [PATCH v8 1/5] HID: intel-thc-hid: intel-ipts: bring up the port Emfox Zhou
2026-11-18  6:57 ` [PATCH v8 2/5] HID: intel-thc-hid: intel-ipts: receive reports Emfox Zhou
2026-11-18  7:19   ` sashiko-bot
2026-11-18  6:57 ` [PATCH v8 3/5] HID: intel-thc-hid: intel-ipts: add the HID device Emfox Zhou
2026-11-18  7:14   ` sashiko-bot
2026-11-18  6:57 ` [PATCH v8 4/5] HID: intel-thc-hid: intel-ipts: handle system sleep Emfox Zhou
2026-11-18  7:17   ` sashiko-bot
2026-11-18  6:57 ` [PATCH v8 5/5] HID: intel-thc-hid: intel-ipts: document the IPTS mode Emfox Zhou

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.