From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=82.195.75.108 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796263480; b=nuIlua0y2ZbQOZyX7B6aahfPz4E9Y6XphvMlSYt5F3sRCjvH7lq+ue3Hr1QXl8OFKzJk H+l6OAXLe7R6a5tJ6VV1PbuCFYpconMfp/efQcZw9CGTiUS1uxdCDfnt9MH8hCOp9+BXG KP6RWSltthrUt/kX85xY1/2HVwhA3okWtXqubXAeNXbQT1xoHjhPw5vWvUTP7ELOTBiF7 7P9LbP8OTd1f25GAHy9Cs0YwEEfOkVNuJQM3umzr7zoD9d5iX6aNB2wp2k/rKCC+aE1iN 1hsPkGkwXtc9hriTJKGh8XrwiybpEMm5sHCzk75sFtSBZ1GS1rVRfkhbNGl6lRDr0cg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796263480; h=DMARC-Filter:DKIM-Signature:Received:From:To:Cc:Subject:Date: Message-ID:X-Mailer:MIME-Version:Content-Transfer-Encoding: X-Debian-User; bh=trhv+RVdUKchSSgFkrnlZB08gHPNwTY3S0JWJ/LqGgE=; b=VwFIsXlMjck6rSaNdcULIrcTa+VoQ27ugfaO8NEQ5nw7fZRpKXOsKzSdXlHFXz6Xobk8 M8j7F6Yo3HgRDmtmK319oSBXdikB9tf5Z7jVwyLsiE0btWwZop0tdFlyw6IK6WwqN7SCC fLT4d/YWrRLM4hlwBpKNM6+BI+29X+GbPwza0qj/OW3cfHiyrL9ahL6q8e/DsN1SbkPs5 6gxihJV+3QJD0hB1s5vF3zd+A+0xxJr7fncZlOqxQIyrV0wDVQ/DFQJkoEVMFh52nLZk3 KDs7VLm2DyO7e37SIhFwx++vEma0riJ/7J5T71xSdQ3uFyqPudmKlgs4t0AgBMnjJEw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=debian.org; spf=pass smtp.mailfrom=debian.org; dkim=pass header.d=debian.org header.i=@debian.org header.a=rsa-sha256 header.s=smtpauto.stravinsky header.b=ABY00mwk; arc=none smtp.remote-ip=82.195.75.108 Received: from stravinsky.debian.org (stravinsky.debian.org [82.195.75.108]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7C193606A32D; Thu, 3 Dec 2026 02:04:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 7C193606A32D Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=debian.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=debian.org header.i=@debian.org header.a=rsa-sha256 header.s=smtpauto.stravinsky header.b=ABY00mwk DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org; s=smtpauto.stravinsky; h=X-Debian-User:Content-Transfer-Encoding:MIME-Version :Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=trhv+RVdUKchSSgFkrnlZB08gHPNwTY3S0JWJ/LqGgE=; b=ABY00mwk84//+anLoO9k0wOZpZ Fhc+Z7yg7T6Biuap3oRot8C28boVhgf9gc23dJSBkLesMXiGAZXiayINqLnAzGUvxwAA67FqVsveF +CpifVpVazWwOGNeQwpYiCdgSLD3PrW3k9v55FJN4IPiMyuBygAXFvAtz9nBllPfUwPa+xi3eVjCw ty3AudASBtlPHh41Qj1nvqPtJj4kbj3+uW1BMkbKGmjrIjxyuSaKdRarCMu9N3EUPjmqi6jViC6T2 OIfTy7pgYmUUecWXzGGswlXlhoAskuRBkKoR04lZ9D07yGqnqsGq1tWDEZlp0KnTuz4Smqy8Lr2BB 6bCl7rOw==; Received: from authenticated-user by stravinsky.debian.org with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1xYwBT-001xKH-1I; Thu, 03 Dec 2026 02:04:32 +0000 From: Emfox Zhou To: Even Xu , Xinpeng Sun , Jiri Kosina , Benjamin Tissoires Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v11 0/6] HID: intel-thc-hid: intel-ipts: support THC IPTS ports Date: Thu, 3 Dec 2026 10:04:09 +0800 Message-ID: X-Mailer: git-send-email 2.55.0 X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Debian-User: emfox 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 port operations IPTS 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 Changes in v11: - The two reset calls are one thc_port_reset(hold): the start asserts the line, waits and releases it, the stop keeps it asserted. DEVRST is zero for asserted and one for released, as the THC datasheet describes it. - thc_spi_hz_from_div() is gone, and so is the clamp around it: the driver converts the divisor the configuration block reports on its own and lets thc_get_spi_freq_div_val() pick the gear. A Surface Pro 8 reports 0x09e351e8, divisor 4, 31.25 MHz. - The quiesce warning stays: a call that changes nothing is worth knowing about. - ipts.c is split into ipts-protocol.c and ipts-hid.c, the way quickspi and quicki2c are laid out. - Commit messages are shorter; the design detail they carried moved to Documentation/hid/intel-thc-hid.rst, which gains a section on the driver structure. - Comments follow the kernel style across the series. - Also from our own review: the interrupt is left open whenever no reset is running, and a run that finds a reset in flight claims nothing, so a transmit completion already on the wire is still delivered; the tables of a failed reset are freed on the next start or stop, and the SPI divisor is rounded up before the gear is picked. v10: https://lore.kernel.org/linux-input/cover.1795794049.git.emfox@debian.org/ 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 port operations IPTS 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 | 136 +++- drivers/hid/intel-thc-hid/Kconfig | 13 + drivers/hid/intel-thc-hid/Makefile | 5 + .../hid/intel-thc-hid/intel-ipts/ipts-hid.c | 267 +++++++ .../intel-thc-hid/intel-ipts/ipts-protocol.c | 682 ++++++++++++++++++ drivers/hid/intel-thc-hid/intel-ipts/ipts.h | 225 ++++++ .../hid/intel-thc-hid/intel-ipts/pci-ipts.c | 228 ++++++ .../intel-thc-hid/intel-thc/intel-thc-dev.c | 58 ++ .../intel-thc-hid/intel-thc/intel-thc-dev.h | 2 + 9 files changed, 1615 insertions(+), 1 deletion(-) create mode 100644 drivers/hid/intel-thc-hid/intel-ipts/ipts-hid.c create mode 100644 drivers/hid/intel-thc-hid/intel-ipts/ipts-protocol.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