HID: Intel-thc-hid: Intel-quicki2c: Add power management for touch device
Subsystems (2)
Even Xu
maintainerPATCH 1/1 HID: Intel-thc-hid: Intel-quicki2c: Add power management for touch device
Send POWER_SLEEP command to touch device when system enters into sleep mode or hibernate mode to save more power; and send POWER_ON command to take device back when system exits sleep mode.
--- .../intel-thc-hid/intel-quicki2c/pci-quicki2c.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
drivers/hid/intel-thc-hid/intel-quicki2c/pci-quicki2c.c +13 -1
@@ -809,6 +809,12 @@ static int quicki2c_suspend(struct device *device)if (!qcdev)return -ENODEV ; +if (!device_may_wakeup (qcdev->dev)) { + ret =quicki2c_set_power (qcdev,HIDI2C_SLEEP ); +if (ret) +return ret; + } +/* * As I2C is THC subsystem, no register auto save/restore support, * need driver to do that explicitly for every D3 case.
@@ -858,6 +864,9 @@ static int quicki2c_resume(struct device *device)if (ret)return ret; +if (!device_may_wakeup (qcdev->dev)) +return quicki2c_set_power (qcdev,HIDI2C_ON ); +return 0 ; }
@@ -915,6 +924,9 @@ static int quicki2c_poweroff(struct device *device)if (!qcdev)return -ENODEV ; +/* Ignore the return value as platform will be poweroff soon */ +quicki2c_set_power (qcdev,HIDI2C_SLEEP ); + ret =thc_interrupt_quiesce (qcdev->thc_hw, true);if (ret)return ret;
@@ -968,7 +980,7 @@ static int quicki2c_restore(struct device *device)thc_change_ltr_mode (qcdev->thc_hw,THC_LTR_MODE_ACTIVE ); -return 0 ; +return quicki2c_set_power (qcdev,HIDI2C_ON ); }static int quicki2c_runtime_suspend (struct device *device)
Signature · 1 line
2.40.1
Jiri Kosina
maintainerQuoted 5 lines · Even Xu
Send
POWER_SLEEPcommand to touch device when system enters into sleep mode or hibernate mode to save more power; and sendPOWER_ONcommand to take device back when system exits sleep mode.Signed-off-by Even Xu <[email protected]>
Applied on top of hid.git#for-6.20/intel-thc, thank you.
Signature · 2 lines
Jiri Kosina SUSE Labs
Xu, Even
maintainerThanks Jiri and Happy New Year!!!
Best Regards,
Even Xu
Quoted 22 lines
-----Original Message-----
From: Jiri Kosina <[email protected]>
Sent: Thursday, January 8, 2026 5:05 AM
To: Xu, Even <[email protected]>
Cc: [email protected]; [email protected]; linux- [email protected]; [email protected]
Subject: Re: [PATCH] HID: Intel-thc-hid: Intel-quicki2c: Add power management for touch deviceQuoted 5 lines · Even Xu
Send
POWER_SLEEPcommand to touch device when system enters into sleep mode or hibernate mode to save more power; and sendPOWER_ONcommand to take device back when system exits sleep mode.Signed-off-by Even Xu <[email protected]>Applied on top of hid.git#for-6.20/intel-thc, thank you.
--
Jiri Kosina
SUSE Labs