Skip to content

Commit 31d31fa

Browse files
author
Jiri Kosina
committed
Merge branch 'for-5.12/multitouch' into for-linus
- hid-multitouch devices should be put into high-latency mode when suspended in order to be in line with Windows Precision Touchpad guidelines. From Blaž Hrastnik.
2 parents fc590a3 + c7aa374 commit 31d31fa

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

drivers/hid/hid-multitouch.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1747,6 +1747,13 @@ static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id)
17471747
}
17481748

17491749
#ifdef CONFIG_PM
1750+
static int mt_suspend(struct hid_device *hdev, pm_message_t state)
1751+
{
1752+
/* High latency is desirable for power savings during S3/S0ix */
1753+
mt_set_modes(hdev, HID_LATENCY_HIGH, true, true);
1754+
return 0;
1755+
}
1756+
17501757
static int mt_reset_resume(struct hid_device *hdev)
17511758
{
17521759
mt_release_contacts(hdev);
@@ -1762,6 +1769,8 @@ static int mt_resume(struct hid_device *hdev)
17621769

17631770
hid_hw_idle(hdev, 0, 0, HID_REQ_SET_IDLE);
17641771

1772+
mt_set_modes(hdev, HID_LATENCY_NORMAL, true, true);
1773+
17651774
return 0;
17661775
}
17671776
#endif
@@ -2155,6 +2164,7 @@ static struct hid_driver mt_driver = {
21552164
.event = mt_event,
21562165
.report = mt_report,
21572166
#ifdef CONFIG_PM
2167+
.suspend = mt_suspend,
21582168
.reset_resume = mt_reset_resume,
21592169
.resume = mt_resume,
21602170
#endif

0 commit comments

Comments
 (0)