Skip to content

Commit 481d846

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 2963b74 commit 481d846

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
@@ -1303,6 +1303,16 @@ static const struct hid_device_id magic_mice[] = {
13031303
};
13041304
MODULE_DEVICE_TABLE(hid, magic_mice);
13051305

1306+
#ifdef CONFIG_PM
1307+
static int magicmouse_reset_resume(struct hid_device *hdev)
1308+
{
1309+
if (hdev->bus == BUS_SPI)
1310+
return magicmouse_enable_multitouch(hdev);
1311+
1312+
return 0;
1313+
}
1314+
#endif
1315+
13061316
static struct hid_driver magicmouse_driver = {
13071317
.name = "magicmouse",
13081318
.id_table = magic_mice,
@@ -1313,6 +1323,10 @@ static struct hid_driver magicmouse_driver = {
13131323
.event = magicmouse_event,
13141324
.input_mapping = magicmouse_input_mapping,
13151325
.input_configured = magicmouse_input_configured,
1326+
#ifdef CONFIG_PM
1327+
.reset_resume = magicmouse_reset_resume,
1328+
#endif
1329+
13161330
};
13171331
module_hid_driver(magicmouse_driver);
13181332

0 commit comments

Comments
 (0)