Skip to content

Commit 97a5df6

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 <[email protected]>
1 parent 02e2694 commit 97a5df6

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
@@ -1273,6 +1273,16 @@ static const struct hid_device_id magic_mice[] = {
12731273
};
12741274
MODULE_DEVICE_TABLE(hid, magic_mice);
12751275

1276+
#ifdef CONFIG_PM
1277+
static int magicmouse_reset_resume(struct hid_device *hdev)
1278+
{
1279+
if (hdev->bus == BUS_SPI)
1280+
return magicmouse_enable_multitouch(hdev);
1281+
1282+
return 0;
1283+
}
1284+
#endif
1285+
12761286
static struct hid_driver magicmouse_driver = {
12771287
.name = "magicmouse",
12781288
.id_table = magic_mice,
@@ -1283,6 +1293,10 @@ static struct hid_driver magicmouse_driver = {
12831293
.event = magicmouse_event,
12841294
.input_mapping = magicmouse_input_mapping,
12851295
.input_configured = magicmouse_input_configured,
1296+
#ifdef CONFIG_PM
1297+
.reset_resume = magicmouse_reset_resume,
1298+
#endif
1299+
12861300
};
12871301
module_hid_driver(magicmouse_driver);
12881302

0 commit comments

Comments
 (0)