Skip to content

Commit

Permalink
HID: multitouch: Disable event reporting on suspend when the device i…
Browse files Browse the repository at this point in the history
…s 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 <hdegoede@redhat.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Hans de Goede authored and Jiri Kosina committed Jun 25, 2021
1 parent 622d97c commit 498d0dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/hid/hid-multitouch.c
Original file line number Diff line number Diff line change
@@ -1768,7 +1768,8 @@ static int mt_suspend(struct hid_device *hdev, pm_message_t state)
struct mt_device *td = hid_get_drvdata(hdev);

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

0 comments on commit 498d0dd

Please sign in to comment.