Skip to contentSkip to conversation

Fix "QuickSPI touch function lost after S4" issue

PATCH New Even Xu 1 participant 3 messages Mar 5, 2025

Subsystems (2)
lore
Share & tools
lore

Even Xu

author maintainer
#0 lore raw

v2 cover Fix "QuickSPI touch function lost after S4" issue

This patch set corrects the grammatical errors in the QuickSPI device state names and fixes the issue where the touch doesn't work after resuming from S4.

Change log:

v2:
- Add patch to correct state name grammatical issue

Even Xu (2):
HID: Intel-thc-hid: Intel-quickspi: Correct device state names
gramatically
HID: Intel-thc-hid: Intel-quickspi: Change device state correctly
after S4

 drivers/hid/intel-thc-hid/intel-quickspi/pci-quickspi.c      | 4 +++-
 drivers/hid/intel-thc-hid/intel-quickspi/quickspi-dev.h      | 4 ++--
 drivers/hid/intel-thc-hid/intel-quickspi/quickspi-protocol.c | 2 +-
 3 files changed, 6 insertions(+), 4 deletions(-)
Signature · 1 line
2.40.1
author maintainer
#1 lore raw

PATCH v2 1/2 HID: Intel-thc-hid: Intel-quickspi: Correct device state names gramatically

Correct quickspi device state name and change the list order to follow device state working flow.

---
 drivers/hid/intel-thc-hid/intel-quickspi/pci-quickspi.c      | 2 +-
 drivers/hid/intel-thc-hid/intel-quickspi/quickspi-dev.h      | 4 ++--
 drivers/hid/intel-thc-hid/intel-quickspi/quickspi-protocol.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/hid/intel-thc-hid/intel-quickspi/pci-quickspi.c +1 -1
index 4641e818dfa4..59d0b71e6e4f 100644
@@ -426,7 +426,7 @@ static struct quickspi_device *quickspi_dev_init(struct pci_dev *pdev, void __io
 
 	thc_interrupt_enable(qsdev->thc_hw, true);
 
-	qsdev->state = QUICKSPI_INITED;
+	qsdev->state = QUICKSPI_INITIATED;
 
 	return qsdev;
 }
drivers/hid/intel-thc-hid/intel-quickspi/quickspi-dev.h +2 -2
index 75179bb26767..6fdf674b21c5 100644
@@ -57,9 +57,9 @@
 
 enum quickspi_dev_state {
 	QUICKSPI_NONE,
+	QUICKSPI_INITIATED,
 	QUICKSPI_RESETING,
-	QUICKSPI_RESETED,
-	QUICKSPI_INITED,
+	QUICKSPI_RESET,
 	QUICKSPI_ENABLED,
 	QUICKSPI_DISABLED,
 };
drivers/hid/intel-thc-hid/intel-quickspi/quickspi-protocol.c +1 -1
index 7373238ceb18..935a6684926c 100644
@@ -333,7 +333,7 @@ int reset_tic(struct quickspi_device *qsdev)
 		return -EINVAL;
 	}
 
-	qsdev->state = QUICKSPI_RESETED;
+	qsdev->state = QUICKSPI_RESET;
 
 	ret = quickspi_get_device_descriptor(qsdev);
 	if (ret)
Signature · 1 line
2.40.1
author maintainer
#2 lore raw

PATCH v2 2/2 HID: Intel-thc-hid: Intel-quickspi: Change device state correctly after S4

In reply to Even Xu

During S4 retore flow, quickspi device was reset by driver and state was changed to QUICKSPI_RESET. It is needed to be change to QUICKSPI_ENABLED state after S4 re-initialization finished, otherwise, device will run in wrong state and HID input data will be dropped.

Fixes 6912aaf3fd24 ("HID: intel-thc-hid: intel-quickspi: Add PM implementation")
---
 drivers/hid/intel-thc-hid/intel-quickspi/pci-quickspi.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/hid/intel-thc-hid/intel-quickspi/pci-quickspi.c +2 -0
index 59d0b71e6e4f..9170af9be777 100644
@@ -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;
 }
 
Signature · 1 line
2.40.1