Skip to content

Input: mshw0485: add opt-in pen userspace interfaces - #84

Draft
ooaklee wants to merge 13 commits into
jglathe:jg/ubuntu-qcom-x1e-7.2.yfrom
ooaklee:x/sp11-pen-abi
Draft

Input: mshw0485: add opt-in pen userspace interfaces#84
ooaklee wants to merge 13 commits into
jglathe:jg/ubuntu-qcom-x1e-7.2.yfrom
ooaklee:x/sp11-pen-abi

Conversation

@ooaklee

@ooaklee ooaklee commented Aug 31, 2026

Copy link
Copy Markdown

Summary

  • add the small HID-core BUS_SPI definition needed by an MSHW0485 HID child
  • split the raw heat-frame misc ABI and the iptsd HIDRAW bridge behind independent options that default to n in Kconfig
  • select both options in the Ubuntu qcom-x1e arm64 policy; runtime registration still requires the matching Denali device-tree opt-in
  • require a matching device-tree opt-in before either optional endpoint can register
  • opt only the shared Surface Pro 11 Denali description into those interfaces

Dependency and status

Review this PR after #82 and #83. Its head is stacked on x/sp11-qspi-touch-core, so the GitHub diff is cumulative until #83 is merged into jg/ubuntu-qcom-x1e-7.2.y. The pen-specific portion is the five commits after 676d8e800267.

This branch does not merge the broad -sp11 staging branch or replay the correction merged through #81. It deliberately builds on the OF-only direct-touch core isolated in #83.

This PR is a draft. A custom build with both options disabled proves that it does not expose the experimental interfaces unintentionally. The Ubuntu qcom-x1e flavour deliberately enables both options, but their matching Denali device-tree properties remain mandatory and the enabled configurations still require the hardware checks below before the topic is ready.

Containment

  • CONFIG_TOUCHSCREEN_MSHW0485_HEAT_FRAME and CONFIG_TOUCHSCREEN_MSHW0485_IPTSD are independent and default to n
  • the Ubuntu qcom-x1e arm64 annotations explicitly select both options as y; this downstream flavour policy does not change their Kconfig defaults
  • the heat-frame misc device additionally requires microsoft,enable-heat-frame-abi
  • the HIDRAW iptsd bridge additionally requires microsoft,enable-iptsd-bridge
  • only the common Surface Pro 11 Denali DTSI carries those properties
  • with both options disabled, the compiled driver retains SP11: add protocol-9 QSPI and OF-only MSHW0485 touch #83's touch-only initialization, falling-edge IRQ handling, and input path, with no misc-device or HID child references
  • the HID child connects with HID_CONNECT_HIDRAW only; it does not create a second touchscreen input device
  • only the core DFT reports are relayed to iptsd; diagnostic report 0x07 and privacy-sensitive report 0x6e remain off the production HIDRAW path
  • the existing MSHW0485 driver remains the sole transport, panel-mode, recovery, and touch owner; the generic SPI-HID transport is not carried
  • no non-Denali board opts into either interface

Provenance

The HID-core commit preserves Jarrett Schultz as the author of the current upstream v4 patch and retains its exact published chain:

  • Signed-off-by: Dmitry Antipov <dmanti@microsoft.com>
  • Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Signed-off-by: Jingyuan Liang <jingyliang@chromium.org>

The one-line HID-BPF enum mirror is explicitly marked as Leon's current-tree adaptation. Signed-off-by: Leon Silcott <leon@boasi.io> is appended to that submission; no Jarrett sign-off is invented because the authoritative v4 patch does not contain one.

The remaining four focused commits are authored by Leon Silcott, carry the authorized Boasi sign-off, and retain immutable links to the corresponding integration commits for the heat-frame and iptsd work.

The final Ubuntu policy commit links the original target-integration commit and preserves Leon Silcott as author with the authorized Boasi sign-off.

The implementation commit also adds a focused MICROSOFT SURFACE G6 TOUCHSCREEN DRIVER maintainer entry covering the driver, binding, ABI documentation, and UAPI header.

Validation

  • git diff --check 676d8e800267..HEAD for the incremental pen topic
  • strict checkpatch is clean for code and style; the imported BUS_SPI commit reports only MISSING_SIGN_OFF for nominal author Jarrett because the exact published trailer chain intentionally contains no Jarrett sign-off
  • ARM64 ubuntu_x1e_defconfig W=1 builds in all four configurations: both options disabled, heat only, iptsd only, and both enabled
  • disabled-build symbol audit confirms there are no misc-device, heat-ABI, HID child, or HIDRAW references in the MSHW0485 object
  • heat-only symbol audit confirms the misc ABI is present without HID-child/HIDRAW references
  • DT binding/schema validation for the two opt-in properties
  • scripts/get_maintainer.pl resolves the new driver, binding, ABI documentation, and UAPI to Leon Silcott and the Linux input list
  • successful builds of both Surface Pro 11 Denali DTBs and the non-SP11 Dell XPS 13 X1E DTB
  • Ubuntu qcom-x1e annotation export selects both options as y; olddefconfig preserves them and the annotations checker reports no MSHW0485 policy drift
  • source audit confirms that both Kconfig options retain default n; compiled-DT audit confirms that only Denali carries the matching runtime opt-ins

Hardware checks still required

  • first confirm the exact SP11: add protocol-9 QSPI and OF-only MSHW0485 touch #83 QSPI/direct-touch build boots and retains stable multitouch and suspend/resume behavior
  • boot a custom build with both optional kernel settings disabled and repeat those direct-touch checks
  • enable only the heat-frame option and verify /dev/g6ts-heat, record framing, polling, generation changes, controller recovery, suspend/resume, and removal while a reader is open
  • enable only the iptsd option and verify the HIDRAW sibling, stylus input through iptsd, feature handling, bounded rebind after recovery, and absence of a duplicate touchscreen device
  • confirm diagnostic report 0x07 and privacy-sensitive report 0x6e are not emitted on the HIDRAW path
  • boot the standard Ubuntu qcom-x1e configuration, with both options selected by annotations, and repeat pen, touch, reset/recovery, suspend/resume, and removal stress tests
  • run the corresponding direct-touch smoke test on both supported SP11 variants; non-SP11 systems remain compile-time guarded because their device trees do not opt in

x1e-nixos and others added 12 commits August 31, 2026 22:39
Define the protocol selector used by the protocol-9 GENI QSPI engine.

Link: 19bed4c
Signed-off-by: x1e-nixos <noreply@scug.io>
Signed-off-by: Leon Silcott <leon@boasi.io>
Add the transfer-ring handling needed by the protocol-9 GENI engine
used for the Surface Pro 11 touchscreen. Keep the existing SPI, I2C,
and UART paths unchanged and preserve DMA_PRIVATE.

Re-lift the hardware-tested implementation onto the current 7.2.2 driver.

Link: 19bed4c
Signed-off-by: x1e-nixos <noreply@scug.io>
Signed-off-by: Leon Silcott <leon@boasi.io>
Document the opt-in controller property used by Microsoft Denali to select
the protocol-9 GENI firmware and QSPI GPI DMA channels.

Signed-off-by: Leon Silcott <leon@boasi.io>
Re-lift the Surface Pro 11 QSPI path onto the current GENI SPI driver.
Select it only when the Denali machine and qcom,geni-qspi property agree.
Leave the common controller path unchanged and preserve the existing GENI
tracepoints.

Support the paired TX-command/RX-data transaction used by MSHW0485 without
exposing the staging branch's laboratory controls or BIOS-reference API.

Link: 65ce06c
Link: b1075e6
Signed-off-by: Leon Silcott <leon@boasi.io>
Describe the OF-only HID-over-SPI touchscreen used by Microsoft Denali,
including its interrupt, reset, power, and SPI requirements.

Signed-off-by: Leon Silcott <leon@boasi.io>
Add the direct touch-input core for the HID-over-SPI controller found on
Microsoft Surface Pro 11. Bind only to microsoft,mshw0485 on Denali and use
the fixed GPIO power/reset sequence described by DT.

Keep the experimental policy alternatives fixed in-kernel. Do not expose
the staging diagnostic attributes or module parameters. Do not include the
separate pen, heat-frame misc device, or HIDRAW interfaces.

Link: b1075e6
Signed-off-by: Leon Silcott <leon@boasi.io>
Enable the protocol-9 QSPI engine and GPI DMA channels only on Microsoft
Denali, then describe the MSHW0485 touchscreen and its control GPIOs.

Link: b1075e6
Signed-off-by: Leon Silcott <leon@boasi.io>
Accept the Surface Pro 11 X1P touchscreen product ID alongside the existing
X1E product ID when validating the MSHW0485 device descriptor.

Link: 3fc7c52
Signed-off-by: Justin White <kyjus25@gmail.com>
Signed-off-by: Leon Silcott <leon@boasi.io>
If connecting a hid_device with bus field indicating BUS_SPI print out
"SPI" in the debug print.

Macro sets the bus field to BUS_SPI and uses arguments to set vendor
product fields.

[Leon: mirror BUS_SPI in the HID-BPF helper enum used by this tree.]

Link: https://patchew.org/linux/20260609-send-upstream-v4-0-b843d5e6ced3@chromium.org/20260609-send-upstream-v4-2-b843d5e6ced3@chromium.org/
Link: 61bb237
Signed-off-by: Dmitry Antipov <dmanti@microsoft.com>
Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jingyuan Liang <jingyliang@chromium.org>
Signed-off-by: Leon Silcott <leon@boasi.io>
Describe independent opt-ins for the raw heat-frame misc ABI and the
HIDRAW-only iptsd bridge. Both interfaces remain disabled unless their
matching kernel option and device-tree property are present.

Link: 71e31fa
Link: dc4f260
Signed-off-by: Leon Silcott <leon@boasi.io>
Rework the Surface Pro 11 pen support behind two independent, default-off
feature gates. The heat-frame option builds the versioned misc-device ABI,
while the iptsd option builds the HIDRAW sibling and native pen input path.

Require a matching device-tree property at probe time for each option
before its endpoint can be registered. With both options disabled, retain
the existing touch initialization, falling-edge IRQ handling, and input
path.
Keep the validated IPTS initialization and level-low IRQ cadence confined
to the iptsd opt-in.

Use the controller driver's existing HID-over-SPI transactions and only add
the HID core support needed for the private BUS_SPI child; do not carry the
generic SPI-HID transport.

Link: b805934
Link: c575142
Link: 71e31fa
Link: dc4f260
Link: f1b743c
Link: f831b6c
Link: c05ed50
Link: 133679a
Link: e417f2f
Signed-off-by: Leon Silcott <leon@boasi.io>
Opt both Surface Pro 11 variants into the optional raw heat-frame ABI and
HIDRAW iptsd bridge. The matching default-off kernel options must still be
enabled before either interface is built, while machines outside the shared
Denali DTSI remain unchanged.

Link: 71e31fa
Link: dc4f260
Signed-off-by: Leon Silcott <leon@boasi.io>
Record the two opt-in MSHW0485 feature gates in the qcom-x1e
annotations. Kconfig still defaults both options to n; this Ubuntu
flavour explicitly enables them for Denali, whose device tree must also
opt in before either endpoint registers.

Link: 4c2356a
Depends-on: jglathe#83
Signed-off-by: Leon Silcott <leon@boasi.io>
ooaklee added a commit to ooaklee/linux_ms_dev_kit-sp11 that referenced this pull request Sep 1, 2026
Integrate jglathe#84 for combined SP11 testing.
@jglathe
jglathe force-pushed the jg/ubuntu-qcom-x1e-7.2.y branch from 87bcf07 to 4943ee7 Compare September 3, 2026 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants