summaryrefslogtreecommitdiff
path: root/drivers/hid
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2021-05-29 17:14:24 +0200
committerJiri Kosina <jkosina@suse.cz>2021-06-25 14:02:59 +0200
commit498d0ddc6ae931e4e79a57c56b6dd4576aa435b6 (patch)
tree5674d02bc284a6c109cef841ba2ae94373c69758 /drivers/hid
parent622d97cf7f2b4efb36bec3c85b5c1db5e3dfd586 (diff)
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 <hdegoede@redhat.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-multitouch.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index 2e4fb76c45f3..3ea7cb1cda84 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -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);