Skip to content

Commit c890a6a

Browse files
committed
HID: magicmouse: Add .reset_resume for SPI trackpads
The trackpad has to request multi touch reports during resume. Signed-off-by: Janne Grunau <j@jannau.net>
1 parent 5eb4ce4 commit c890a6a

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

drivers/hid/hid-magicmouse.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1299,6 +1299,16 @@ static const struct hid_device_id magic_mice[] = {
12991299
};
13001300
MODULE_DEVICE_TABLE(hid, magic_mice);
13011301

1302+
#ifdef CONFIG_PM
1303+
static int magicmouse_reset_resume(struct hid_device *hdev)
1304+
{
1305+
if (hdev->bus == BUS_SPI)
1306+
return magicmouse_enable_multitouch(hdev);
1307+
1308+
return 0;
1309+
}
1310+
#endif
1311+
13021312
static struct hid_driver magicmouse_driver = {
13031313
.name = "magicmouse",
13041314
.id_table = magic_mice,
@@ -1309,6 +1319,10 @@ static struct hid_driver magicmouse_driver = {
13091319
.event = magicmouse_event,
13101320
.input_mapping = magicmouse_input_mapping,
13111321
.input_configured = magicmouse_input_configured,
1322+
#ifdef CONFIG_PM
1323+
.reset_resume = magicmouse_reset_resume,
1324+
#endif
1325+
13121326
};
13131327
module_hid_driver(magicmouse_driver);
13141328

0 commit comments

Comments
 (0)