From: Emfox Zhou <emfox@debian.org>
To: Even Xu <even.xu@intel.com>, Xinpeng Sun <xinpeng.sun@intel.com>,
Jiri Kosina <jikos@kernel.org>,
Benjamin Tissoires <bentiss@kernel.org>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v10 0/6] HID: intel-thc-hid: intel-ipts: support THC IPTS ports
Date: Fri, 27 Nov 2026 23:51:34 +0800 [thread overview]
Message-ID: <cover.1795794049.git.emfox@debian.org> (raw)
The THC ports on Tiger Lake, Lakefield, Alder Lake and Raptor Lake can
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.
1/6 expose the operations an IPTS port needs (core)
2/6 bring up the port
3/6 receive reports
4/6 add the HID device
5/6 handle system sleep
6/6 document the IPTS mode
The first patch is new in v10 and answers the layering review: the
backend no longer writes THC_M_PRT_CONTROL itself and no longer keeps a
copy of the SPI base clock. The core exports thc_port_supported(),
thc_port_reset_release(), thc_port_reset_hold() and
thc_spi_hz_from_div(), and thc_interrupt_quiesce() stops warning when the
port is already in the state that was asked for.
Changes in v10:
- One core patch plus five driver patches; no direct register access and
no private SPI base clock left in intel-ipts/.
- A state machine (DOWN, RESET, CONFIG, DMA, UP) replaces the running
and dma_ready flags, so teardown knows how far to unwind.
- The hardirq stays out of the status registers while a reset owns them,
and the threaded handler neither acknowledges nor claims the line in
that window.
- resume_noirq/restore_noirq mask the port as soon as configuration
space is back, as asked in the review of 4/5.
- IRQF_SHARED|IRQF_COND_ONESHOT is used only for the legacy pin; the
MSI fallback is not a shared interrupt.
- Headers are grouped and sorted, and the series is clean under
checkpatch --strict.
This is based on the two intel-thc fix series below, applied in this order:
[PATCH v3 0/5] HID: intel-thc-hid: intel-thc: DMA lifetime fixes
https://lore.kernel.org/linux-input/cover.1795791500.git.emfox@debian.org/
[PATCH v8] HID: intel-thc-hid: intel-thc: restore PRD table capacity
https://lore.kernel.org/linux-input/20261127234500.424242-1-emfox@debian.org/
The first gives the DMA engines a lifetime, the second keeps a PRD table
from overrunning after a reset; the recovery path here relies on both,
and they overlap in intel-thc-dma.c, so apply them in that order.
The base-commit below is the tree those two series are based on. The six
patches here apply on top of them, not to the base alone: 1/6 extends the
core file the first series rewrites.
The hardware facts this driver relies on - port IDs, the configuration
block layout, frame codes and header sizes - were confirmed on a Surface
Pro 8 with a 045e:0c37 controller.
Emfox Zhou (6):
HID: intel-thc-hid: intel-thc: expose the operations an IPTS port
needs
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 | 976 ++++++++++++++++++
drivers/hid/intel-thc-hid/intel-ipts/ipts.h | 220 ++++
.../hid/intel-thc-hid/intel-ipts/pci-ipts.c | 233 +++++
.../intel-thc-hid/intel-thc/intel-thc-dev.c | 107 +-
.../intel-thc-hid/intel-thc/intel-thc-dev.h | 4 +
8 files changed, 1658 insertions(+), 9 deletions(-)
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: 4f048c56c2697000105a75c28b918ae76f11fcef
prerequisite-patch-id: 1921888f4500ace81255e73142f40b89e4a75fd2
prerequisite-patch-id: e87bd84cb62f9d122e80b0636ec02103ee4eef96
prerequisite-patch-id: 682e6eeea6eb7792c7b2f00b14226cb9a3d1c56c
prerequisite-patch-id: efd51e0ca2778c5028ba030ddfaee6da5a82622d
prerequisite-patch-id: 1fa0e32622986734adb7ce7040400f169bc26f2b
prerequisite-patch-id: 06a128cb2c3db1f80116b314d11d69cda0d4dce0
next reply other threads:[~2026-11-27 15:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 15:51 Emfox Zhou [this message]
2026-11-27 15:51 ` [PATCH v10 1/6] HID: intel-thc-hid: intel-thc: expose the operations an IPTS port needs Emfox Zhou
2026-11-27 15:51 ` [PATCH v10 2/6] HID: intel-thc-hid: intel-ipts: bring up the port Emfox Zhou
2026-11-27 15:51 ` [PATCH v10 3/6] HID: intel-thc-hid: intel-ipts: receive reports Emfox Zhou
2026-11-27 15:51 ` [PATCH v10 4/6] HID: intel-thc-hid: intel-ipts: add the HID device Emfox Zhou
2026-11-27 15:51 ` [PATCH v10 5/6] HID: intel-thc-hid: intel-ipts: handle system sleep Emfox Zhou
2026-11-27 15:51 ` [PATCH v10 6/6] HID: intel-thc-hid: intel-ipts: document the IPTS mode Emfox Zhou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1795794049.git.emfox@debian.org \
--to=emfox@debian.org \
--cc=bentiss@kernel.org \
--cc=even.xu@intel.com \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=xinpeng.sun@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®