Thread (6 messages) 6 messages, 2 authors, 2016-09-22

Re: [PATCH] HID: alps: fix stick device not working after resume

flat view

From: Kai Heng Feng <hidden>
Date: 2016-09-19 15:57:57
Also in: lkml

On Mon, Sep 19, 2016 at 8:37 PM, Jiri Kosina [off-list ref] wrote:
On Mon, 19 Sep 2016, Kai-Heng Feng wrote:
quoted
The stick device does not work after resume, add U1_SP_ABS_MODE flag can
make the device work after resume.
Do you happen to have any more details on why it doesn't work without
U1_SP_ABS_MODE? Or was this a pure guesswork?
It' 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.
quoted
Signed-off-by: Kai-Heng Feng <redacted>
---
 drivers/hid/hid-alps.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hid/hid-alps.c b/drivers/hid/hid-alps.c
index 048befd..390f8d3 100644
--- a/drivers/hid/hid-alps.c
+++ b/drivers/hid/hid-alps.c
@@ -244,13 +244,13 @@ static int alps_raw_event(struct hid_device *hdev,
 static int alps_post_reset(struct hid_device *hdev)
 {
      return u1_read_write_register(hdev, ADDRESS_U1_DEV_CTRL_1,
-                             NULL, U1_TP_ABS_MODE, false);
+                             NULL, U1_TP_ABS_MODE | U1_SP_ABS_MODE, false);
 }

 static int alps_post_resume(struct hid_device *hdev)
 {
      return u1_read_write_register(hdev, ADDRESS_U1_DEV_CTRL_1,
-                             NULL, U1_TP_ABS_MODE, false);
+                             NULL, U1_TP_ABS_MODE | U1_SP_ABS_MODE, false);
 }
 #endif /* CONFIG_PM */
--
Jiri Kosina
SUSE Labs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help