Skip to content

Commit 1b26a9a

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 910ac81 commit 1b26a9a

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
@@ -1334,6 +1334,16 @@ static const struct hid_device_id magic_mice[] = {
13341334
};
13351335
MODULE_DEVICE_TABLE(hid, magic_mice);
13361336

1337+
#ifdef CONFIG_PM
1338+
static int magicmouse_reset_resume(struct hid_device *hdev)
1339+
{
1340+
if (hdev->bus == BUS_SPI)
1341+
return magicmouse_enable_multitouch(hdev);
1342+
1343+
return 0;
1344+
}
1345+
#endif
1346+
13371347
static struct hid_driver magicmouse_driver = {
13381348
.name = "magicmouse",
13391349
.id_table = magic_mice,
@@ -1344,6 +1354,10 @@ static struct hid_driver magicmouse_driver = {
13441354
.event = magicmouse_event,
13451355
.input_mapping = magicmouse_input_mapping,
13461356
.input_configured = magicmouse_input_configured,
1357+
#ifdef CONFIG_PM
1358+
.reset_resume = magicmouse_reset_resume,
1359+
#endif
1360+
13471361
};
13481362
module_hid_driver(magicmouse_driver);
13491363

0 commit comments

Comments
 (0)