mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Fix "QuickSPI touch function lost after S4" issue
@ 2025-03-05  3:33 Even Xu
  2025-03-05  3:33 ` [PATCH v2 1/2] HID: Intel-thc-hid: Intel-quickspi: Correct device state names gramatically Even Xu
  2025-03-05  3:33 ` [PATCH v2 2/2] HID: Intel-thc-hid: Intel-quickspi: Change device state correctly after S4 Even Xu
  0 siblings, 2 replies; 3+ messages in thread
From: Even Xu @ 2025-03-05  3:33 UTC (permalink / raw)
  To: jikos, bentiss
  Cc: srinivas.pandruvada, mpearson-lenovo, linux-input, linux-kernel, Even Xu

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(-)

-- 
2.40.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v2 1/2] HID: Intel-thc-hid: Intel-quickspi: Correct device state names gramatically
  2025-03-05  3:33 [PATCH v2 0/2] Fix "QuickSPI touch function lost after S4" issue Even Xu
@ 2025-03-05  3:33 ` Even Xu
  2025-03-05  3:33 ` [PATCH v2 2/2] HID: Intel-thc-hid: Intel-quickspi: Change device state correctly after S4 Even Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Even Xu @ 2025-03-05  3:33 UTC (permalink / raw)
  To: jikos, bentiss
  Cc: srinivas.pandruvada, mpearson-lenovo, linux-input, linux-kernel, Even Xu

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

Signed-off-by: Even Xu <even.xu@intel.com>
---
 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(-)

diff --git a/drivers/hid/intel-thc-hid/intel-quickspi/pci-quickspi.c b/drivers/hid/intel-thc-hid/intel-quickspi/pci-quickspi.c
index 4641e818dfa4..59d0b71e6e4f 100644
--- a/drivers/hid/intel-thc-hid/intel-quickspi/pci-quickspi.c
+++ b/drivers/hid/intel-thc-hid/intel-quickspi/pci-quickspi.c
@@ -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;
 }
diff --git a/drivers/hid/intel-thc-hid/intel-quickspi/quickspi-dev.h b/drivers/hid/intel-thc-hid/intel-quickspi/quickspi-dev.h
index 75179bb26767..6fdf674b21c5 100644
--- a/drivers/hid/intel-thc-hid/intel-quickspi/quickspi-dev.h
+++ b/drivers/hid/intel-thc-hid/intel-quickspi/quickspi-dev.h
@@ -57,9 +57,9 @@
 
 enum quickspi_dev_state {
 	QUICKSPI_NONE,
+	QUICKSPI_INITIATED,
 	QUICKSPI_RESETING,
-	QUICKSPI_RESETED,
-	QUICKSPI_INITED,
+	QUICKSPI_RESET,
 	QUICKSPI_ENABLED,
 	QUICKSPI_DISABLED,
 };
diff --git a/drivers/hid/intel-thc-hid/intel-quickspi/quickspi-protocol.c b/drivers/hid/intel-thc-hid/intel-quickspi/quickspi-protocol.c
index 7373238ceb18..935a6684926c 100644
--- a/drivers/hid/intel-thc-hid/intel-quickspi/quickspi-protocol.c
+++ b/drivers/hid/intel-thc-hid/intel-quickspi/quickspi-protocol.c
@@ -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)
-- 
2.40.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v2 2/2] HID: Intel-thc-hid: Intel-quickspi: Change device state correctly after S4
  2025-03-05  3:33 [PATCH v2 0/2] Fix "QuickSPI touch function lost after S4" issue Even Xu
  2025-03-05  3:33 ` [PATCH v2 1/2] HID: Intel-thc-hid: Intel-quickspi: Correct device state names gramatically Even Xu
@ 2025-03-05  3:33 ` Even Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Even Xu @ 2025-03-05  3:33 UTC (permalink / raw)
  To: jikos, bentiss
  Cc: srinivas.pandruvada, mpearson-lenovo, linux-input, linux-kernel, 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.

Signed-off-by: Even Xu <even.xu@intel.com>
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(+)

diff --git a/drivers/hid/intel-thc-hid/intel-quickspi/pci-quickspi.c b/drivers/hid/intel-thc-hid/intel-quickspi/pci-quickspi.c
index 59d0b71e6e4f..9170af9be777 100644
--- a/drivers/hid/intel-thc-hid/intel-quickspi/pci-quickspi.c
+++ b/drivers/hid/intel-thc-hid/intel-quickspi/pci-quickspi.c
@@ -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;
 }
 
-- 
2.40.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-03-05  3:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-05  3:33 [PATCH v2 0/2] Fix "QuickSPI touch function lost after S4" issue Even Xu
2025-03-05  3:33 ` [PATCH v2 1/2] HID: Intel-thc-hid: Intel-quickspi: Correct device state names gramatically Even Xu
2025-03-05  3:33 ` [PATCH v2 2/2] HID: Intel-thc-hid: Intel-quickspi: Change device state correctly after S4 Even Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®