Skip to content

Commit e8b4ee3

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 6379250 commit e8b4ee3

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
@@ -1347,6 +1347,16 @@ static const struct hid_device_id magic_mice[] = {
13471347
};
13481348
MODULE_DEVICE_TABLE(hid, magic_mice);
13491349

1350+
#ifdef CONFIG_PM
1351+
static int magicmouse_reset_resume(struct hid_device *hdev)
1352+
{
1353+
if (hdev->bus == BUS_SPI)
1354+
return magicmouse_enable_multitouch(hdev);
1355+
1356+
return 0;
1357+
}
1358+
#endif
1359+
13501360
static struct hid_driver magicmouse_driver = {
13511361
.name = "magicmouse",
13521362
.id_table = magic_mice,
@@ -1357,6 +1367,10 @@ static struct hid_driver magicmouse_driver = {
13571367
.event = magicmouse_event,
13581368
.input_mapping = magicmouse_input_mapping,
13591369
.input_configured = magicmouse_input_configured,
1370+
#ifdef CONFIG_PM
1371+
.reset_resume = magicmouse_reset_resume,
1372+
#endif
1373+
13601374
};
13611375
module_hid_driver(magicmouse_driver);
13621376

0 commit comments

Comments
 (0)