[PATCH 0/2] HID: spi-hid: handle reset assertion and resume handshake failures
From: fQwQf
Date: Sat Oct 10 2026 - 12:57:49 EST
Hi Jingyuan,
I applied the complete v5 series to its stated base and found two
remaining error paths:
- Initialization continues after assert_reset() fails, powering up the
device and enabling its IRQ while returning success.
- The resume reset wait only logs a missing device descriptor, so the
HID reset_resume callback can run without a completed handshake.
Propagate the assertion error, and return -ETIMEDOUT from the reset wait
while scheduling the existing bounded recovery worker. Skip the HID
resume callback on that timeout, including the failed-suspend rollback
path, where the original suspend error remains the return value.
The PM core can therefore report an incomplete resume, while the worker
may still recover the device asynchronously.
The actual driver functions were exercised with mock firmware/IRQ/HID
interfaces under ASan/UBSan. The SL7 integration's SPI-HID core, OF and
ACPI objects compile with W=1 on ARM64. The full integration boots and
works in normal use on SL7. Logs from two s2idle cycles show the touchpad
being re-enumerated and iptsd reconnecting automatically; the transport
and regulator error counters remain zero.
Based on your v5:
https://lore.kernel.org/all/20261009-send-upstream-v5-0-384af01da3ee@xxxxxxxxxxxx/
Upstream base: ee9c669f9bf5fd2c24206746ded9382fe810df89.
Best regards,
Jizhou Tong
fQwQf (2):
HID: spi-hid: propagate reset assertion errors during initialization
HID: spi-hid: report a missing reset handshake on resume
drivers/hid/spi-hid/spi-hid-core.c | 25 ++++++++++++++++++-------
1 file changed, 18 insertions(+), 7 deletions(-)
base-commit: ee9c669f9bf5fd2c24206746ded9382fe810df89
prerequisite-patch-id: b401890d766019f0677a572f18bb389cd8827721
prerequisite-patch-id: beaf91cb29f3a735559a3251092ac0ac17810b10
prerequisite-patch-id: 909ee816b83e0bc8bb4b560f8c7cc0c8109c4516
prerequisite-patch-id: 8b60145a9a853a32881af27181c26dff0e82a33e
prerequisite-patch-id: bcb36384a391e48222f0924b0c571fb0eac19ae7
prerequisite-patch-id: 816dfccf7d35ea041c0d7c08c7bfbe061a45c7dc
prerequisite-patch-id: 67a41d4cb6bfa41248d89a8f967d4414cff2da2e
prerequisite-patch-id: d0bf155ff4d70a3aeb88ec0232f04a4b2edb3598
prerequisite-patch-id: f18d9032e5ed5713beb37527dba225ec79589b31
prerequisite-patch-id: 854affdd16efb5696f9ed1d2a8cdb50dababe724
prerequisite-patch-id: 248c986cba937716c739b804039376ac3823f618