From: Tawheed Makhdoomi <_@tawheed.cc>
To: Jiri Kosina <jikos@kernel.org>,
Benjamin Tissoires <bentiss@kernel.org>,
Jingyuan Liang <jingyliang@chromium.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-input@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [RFC PATCH 3/3] HID: spi-hid-of: add the Surface Pro X touch digitizer
Date: Thu, 12 Nov 2026 12:26:41 -0500 [thread overview]
Message-ID: <20261112172641.407-4-_@tawheed.cc> (raw)
In-Reply-To: <20261112172641.407-1-_@tawheed.cc>
The Surface Pro X digitizer speaks the pre-release HID over SPI protocol
revision. Both the input report header and body are read from 0x1000
with opcode 0x0b, and the device descriptor is requested from register 1
with opcode 0x02; the other registers come from the device descriptor.
Add match data for it, with the same timings as the G6 digitizer, under
the "microsoft,surface-pro-x-touch-digitizer" compatible and SPI device
ID.
Signed-off-by: Tawheed Makhdoomi <_@tawheed.cc>
---
drivers/hid/spi-hid/spi-hid-of.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/drivers/hid/spi-hid/spi-hid-of.c b/drivers/hid/spi-hid/spi-hid-of.c
index 6de9affbe..429bf51ad 100644
--- a/drivers/hid/spi-hid/spi-hid-of.c
+++ b/drivers/hid/spi-hid/spi-hid-of.c
@@ -62,6 +62,24 @@ static const struct spi_hid_of_data microsoft_g6_data = {
.minimal_reset_delay_ms = 100,
};
+/*
+ * The Surface Pro X digitizer implements the pre-release protocol revision.
+ * Input report header and body are both read from 0x1000, and the device
+ * descriptor is requested from register 1.
+ */
+static const struct spi_hid_of_data microsoft_surface_pro_x_data = {
+ .conf = {
+ .input_report_header_address = 0x1000,
+ .input_report_body_address = 0x1000,
+ .output_report_address = 0x1,
+ .read_opcode = 0x0b,
+ .write_opcode = 0x02,
+ .protocol = SPI_HID_PROTOCOL_V2,
+ },
+ .post_power_on_delay_ms = 10,
+ .minimal_reset_delay_ms = 100,
+};
+
static int spi_hid_of_populate_config(struct spi_hid_of_config *conf,
struct device *dev)
{
@@ -181,12 +199,20 @@ static int spi_hid_of_probe(struct spi_device *spi)
static const struct of_device_id spi_hid_of_match[] = {
{ .compatible = "microsoft,g6-touch-digitizer", .data = µsoft_g6_data },
+ {
+ .compatible = "microsoft,surface-pro-x-touch-digitizer",
+ .data = µsoft_surface_pro_x_data
+ },
{ }
};
MODULE_DEVICE_TABLE(of, spi_hid_of_match);
static const struct spi_device_id spi_hid_of_id_table[] = {
{ .name = "g6-touch-digitizer", .driver_data = (kernel_ulong_t)µsoft_g6_data },
+ {
+ .name = "surface-pro-x-touch-digitizer",
+ .driver_data = (kernel_ulong_t)µsoft_surface_pro_x_data
+ },
{ }
};
MODULE_DEVICE_TABLE(spi, spi_hid_of_id_table);
--
2.43.0
prev parent reply other threads:[~2026-11-12 17:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 17:26 [RFC PATCH 0/3] HID: spi-hid: support the pre-release protocol (Surface Pro X digitizer) Tawheed Makhdoomi
2026-11-12 17:26 ` [RFC PATCH 1/3] dt-bindings: input: hid-over-spi: add the Surface Pro X touch digitizer Tawheed Makhdoomi
2026-11-12 18:41 ` Conor Dooley
2026-11-12 17:26 ` [RFC PATCH 2/3] HID: spi-hid: support the pre-release HID over SPI protocol revision Tawheed Makhdoomi
2026-11-12 17:26 ` Tawheed Makhdoomi [this message]
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=20261112172641.407-4-_@tawheed.cc \
--to=_@tawheed.cc \
--cc=bentiss@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=jikos@kernel.org \
--cc=jingyliang@chromium.org \
--cc=krzk+dt@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
/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