Skip to content

Commit 04fd4cb

Browse files
khfengJiri Kosina
authored andcommitted
HID: alps: fix stick device not working after resume
The stick device does not work after resume, add U1_SP_ABS_MODE flag can make the device work after resume. This has been discovered by pure guesswork, based on how the existing code uses U1_TP_ABS_MODE flag on both initialization and resume. I also tested the the patch on an ALPS touchpad without stick device, did not notice any side effect on suspend/resume, so I made the U1_SP_ABS_MODE flag mandatory. [[email protected]: made changelog more verbose] Signed-off-by: Kai-Heng Feng <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 7ee2eaa commit 04fd4cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/hid/hid-alps.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,13 +245,13 @@ static int alps_raw_event(struct hid_device *hdev,
245245
static int alps_post_reset(struct hid_device *hdev)
246246
{
247247
return u1_read_write_register(hdev, ADDRESS_U1_DEV_CTRL_1,
248-
NULL, U1_TP_ABS_MODE, false);
248+
NULL, U1_TP_ABS_MODE | U1_SP_ABS_MODE, false);
249249
}
250250

251251
static int alps_post_resume(struct hid_device *hdev)
252252
{
253253
return u1_read_write_register(hdev, ADDRESS_U1_DEV_CTRL_1,
254-
NULL, U1_TP_ABS_MODE, false);
254+
NULL, U1_TP_ABS_MODE | U1_SP_ABS_MODE, false);
255255
}
256256
#endif /* CONFIG_PM */
257257

0 commit comments

Comments
 (0)