mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-08-09 06:14:34 +02:00
On the Surface Pro 10 (Meteor Lake) the touchscreen stops working after a suspend/resume cycle and only recovers after a reboot. The driver logs "GET_DEVICE_INFO: recv failed: -11" on resume. This platform suspends through s2idle: /sys/power/mem_sleep exposes "[s2idle]" as the only state, there is no "deep"/S3 entry at all. The touch IC nonetheless loses power across that s2idle suspend, the same way it does across hibernation. quickspi_resume() only re-selects the THC port, restores interrupts and DMA and sends a HIDSPI_ON command, assuming the touch IC kept its power and state. When it has actually lost power the HIDSPI_ON command is never acknowledged and the descriptor read fails, leaving the touchscreen dead until the module is reloaded. quickspi_restore() already handles this for hibernation by reconfiguring the THC SPI/LTR settings and running reset_tic() to re-enumerate the device. Make quickspi_resume() do the same when the device is not a wake source. A wake-enabled device keeps its power and state across suspend, so it stays on the light restore path: resetting it would discard a pending wake touch event and break wake-on-touch. The non-wake path mirrors the existing quickspi_restore() sequence, including enabling interrupts before reset_tic(), so it introduces no new ordering relative to code already in the driver. This change has been validated on a Surface Pro 10 running the linux-surface kernel across multiple s2idle suspend/resume cycles; it has not been tested on a mainline build. Closes: https://github.com/linux-surface/linux-surface/issues/1799 Signed-off-by: Danny D. <d3z.the.dev@gmail.com> Reviewed-by: Even Xu <even.xu@intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>