Skip to content

Commit 498d0dd

Browse files
jwrdegoedeJiri Kosina
authored andcommitted
HID: multitouch: Disable event reporting on suspend when the device is not a wakeup-source
Disable event reporting on suspend when the hid device is not a wakeup-source. This should help save some extra power in this case. Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Benjamin Tissoires <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 622d97c commit 498d0dd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/hid/hid-multitouch.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1768,7 +1768,8 @@ static int mt_suspend(struct hid_device *hdev, pm_message_t state)
17681768
struct mt_device *td = hid_get_drvdata(hdev);
17691769

17701770
/* High latency is desirable for power savings during S3/S0ix */
1771-
if (td->mtclass.quirks & MT_QUIRK_DISABLE_WAKEUP)
1771+
if ((td->mtclass.quirks & MT_QUIRK_DISABLE_WAKEUP) ||
1772+
!hid_hw_may_wakeup(hdev))
17721773
mt_set_modes(hdev, HID_LATENCY_HIGH, false, false);
17731774
else
17741775
mt_set_modes(hdev, HID_LATENCY_HIGH, true, true);

0 commit comments

Comments
 (0)