]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
HID: Intel-thc-hid: Intel-quickspi: Correct device state after S4
authorEven Xu <even.xu@intel.com>
Tue, 4 Mar 2025 03:22:55 +0000 (11:22 +0800)
committerJiri Kosina <jkosina@suse.com>
Tue, 4 Mar 2025 20:54:30 +0000 (21:54 +0100)
During S4 retore flow, quickspi device was resetted by driver and state
was changed to RESETTED. It is needed to be change to ENABLED state
after S4 re-initialization finished, otherwise, device will run in wrong
state and HID input data will be dropped.

Signed-off-by: Even Xu <even.xu@intel.com>
Fixes: 6912aaf3fd24 ("HID: intel-thc-hid: intel-quickspi: Add PM implementation")
Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/intel-thc-hid/intel-quickspi/pci-quickspi.c

index 4641e818dfa44e57d37f33bb524f52d70201522d..6b2c7620be2b180de8f9fc73a554d9abf368d64b 100644 (file)
@@ -909,6 +909,8 @@ static int quickspi_restore(struct device *device)
 
        thc_change_ltr_mode(qsdev->thc_hw, THC_LTR_MODE_ACTIVE);
 
+       qsdev->state = QUICKSPI_ENABLED;
+
        return 0;
 }