Skip to content

Commit 17f9b97

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 08f10a1 commit 17f9b97

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

1274+
#ifdef CONFIG_PM
1275+
static int magicmouse_reset_resume(struct hid_device *hdev)
1276+
{
1277+
if (hdev->bus == BUS_SPI)
1278+
return magicmouse_enable_multitouch(hdev);
1279+
1280+
return 0;
1281+
}
1282+
#endif
1283+
12741284
static struct hid_driver magicmouse_driver = {
12751285
.name = "magicmouse",
12761286
.id_table = magic_mice,
@@ -1281,6 +1291,10 @@ static struct hid_driver magicmouse_driver = {
12811291
.event = magicmouse_event,
12821292
.input_mapping = magicmouse_input_mapping,
12831293
.input_configured = magicmouse_input_configured,
1294+
#ifdef CONFIG_PM
1295+
.reset_resume = magicmouse_reset_resume,
1296+
#endif
1297+
12841298
};
12851299
module_hid_driver(magicmouse_driver);
12861300

0 commit comments

Comments
 (0)