提交 498d0ddc 编写于 作者: H Hans de Goede 提交者: Jiri Kosina

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: NHans de Goede <hdegoede@redhat.com>
Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 622d97cf
...@@ -1768,7 +1768,8 @@ static int mt_suspend(struct hid_device *hdev, pm_message_t state) ...@@ -1768,7 +1768,8 @@ static int mt_suspend(struct hid_device *hdev, pm_message_t state)
struct mt_device *td = hid_get_drvdata(hdev); struct mt_device *td = hid_get_drvdata(hdev);
/* High latency is desirable for power savings during S3/S0ix */ /* 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); mt_set_modes(hdev, HID_LATENCY_HIGH, false, false);
else else
mt_set_modes(hdev, HID_LATENCY_HIGH, true, true); mt_set_modes(hdev, HID_LATENCY_HIGH, true, true);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册