diff options
author | Kai-Heng Feng <kai.heng.feng@canonical.com> | 2016-09-19 03:41:39 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2016-09-22 05:07:16 -0400 |
commit | 04fd4cb0b098789725d04e9d4a7e7dda373b1121 (patch) | |
tree | f6c1cfb41e85db962abd6bd55fa59e10aedd2a46 | |
parent | 7ee2eaa3641827a9ecdffa190cde31846024d2e3 (diff) |
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.
[jkosina@suse.cz: made changelog more verbose]
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r-- | drivers/hid/hid-alps.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hid/hid-alps.c b/drivers/hid/hid-alps.c index 2808da9ed9c8..afc847fb2b06 100644 --- a/drivers/hid/hid-alps.c +++ b/drivers/hid/hid-alps.c | |||
@@ -245,13 +245,13 @@ static int alps_raw_event(struct hid_device *hdev, | |||
245 | static int alps_post_reset(struct hid_device *hdev) | 245 | static int alps_post_reset(struct hid_device *hdev) |
246 | { | 246 | { |
247 | return u1_read_write_register(hdev, ADDRESS_U1_DEV_CTRL_1, | 247 | 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); |
249 | } | 249 | } |
250 | 250 | ||
251 | static int alps_post_resume(struct hid_device *hdev) | 251 | static int alps_post_resume(struct hid_device *hdev) |
252 | { | 252 | { |
253 | return u1_read_write_register(hdev, ADDRESS_U1_DEV_CTRL_1, | 253 | 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); |
255 | } | 255 | } |
256 | #endif /* CONFIG_PM */ | 256 | #endif /* CONFIG_PM */ |
257 | 257 | ||