[PATCH] HID: i2c-hid: Remove SET_POWER SLEEP on system suspend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There's a Cirque touchpad that wakes system up without anything touched
the touchpad. The input report is empty when this happens.
The reason is stated in HID over I2C spec, 7.2.8.2:
"If the DEVICE wishes to wake the HOST from its low power state, it can
issue a wake by asserting the interrupt."

This is fine if OS can put system back to suspend by identifying input
wakeup count stays the same on resume, like Chrome OS Dark Resume [0].
But for regular distro such policy is lacking.

According to commit d9f448e3d71f ("HID: i2c-hid: set power sleep before
shutdown"), SLEEP is required for shutdown, in addition to that, commit
67b18dfb8cfc ("HID: i2c-hid: Remove runtime power management") didn't
notice any power comsumption reduction from SET_POWER SLEEP, so also
remove that to avoid the device asserting the interrupt.

[0] https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/power_manager/docs/dark_resume.md

Signed-off-by: Kai-Heng Feng <kai.heng.feng@xxxxxxxxxxxxx>
---
 drivers/hid/i2c-hid/i2c-hid-core.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/hid/i2c-hid/i2c-hid-core.c b/drivers/hid/i2c-hid/i2c-hid-core.c
index 2735cd585af0..dd513dc75cb9 100644
--- a/drivers/hid/i2c-hid/i2c-hid-core.c
+++ b/drivers/hid/i2c-hid/i2c-hid-core.c
@@ -957,9 +957,6 @@ static int i2c_hid_core_suspend(struct i2c_hid *ihid, bool force_poweroff)
 	if (ret < 0)
 		return ret;
 
-	/* Save some power */
-	i2c_hid_set_power(ihid, I2C_HID_PWR_SLEEP);
-
 	disable_irq(client->irq);
 
 	if (force_poweroff || !device_may_wakeup(&client->dev))
-- 
2.34.1





[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux