Skip to content

Commit 21305be

Browse files
jannaumarcan
authored andcommitted
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 0f755bd commit 21305be

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
@@ -1268,6 +1268,16 @@ static const struct hid_device_id magic_mice[] = {
12681268
};
12691269
MODULE_DEVICE_TABLE(hid, magic_mice);
12701270

1271+
#ifdef CONFIG_PM
1272+
static int magicmouse_reset_resume(struct hid_device *hdev)
1273+
{
1274+
if (hdev->bus == BUS_SPI)
1275+
return magicmouse_enable_multitouch(hdev);
1276+
1277+
return 0;
1278+
}
1279+
#endif
1280+
12711281
static struct hid_driver magicmouse_driver = {
12721282
.name = "magicmouse",
12731283
.id_table = magic_mice,
@@ -1278,6 +1288,10 @@ static struct hid_driver magicmouse_driver = {
12781288
.event = magicmouse_event,
12791289
.input_mapping = magicmouse_input_mapping,
12801290
.input_configured = magicmouse_input_configured,
1291+
#ifdef CONFIG_PM
1292+
.reset_resume = magicmouse_reset_resume,
1293+
#endif
1294+
12811295
};
12821296
module_hid_driver(magicmouse_driver);
12831297

0 commit comments

Comments
 (0)