* [PATCH] HID: alps: fix stick device not working after resume
@ 2016-09-19 7:41 Kai-Heng Feng
2016-09-19 12:37 ` Jiri Kosina
2016-09-22 9:08 ` Jiri Kosina
0 siblings, 2 replies; 6+ messages in thread
From: Kai-Heng Feng @ 2016-09-19 7:41 UTC (permalink / raw)
To: jikos; +Cc: linux-input, linux-kernel, masaki.ota, kai.heng.feng
The stick device does not work after resume, add U1_SP_ABS_MODE flag can
make the device work after resume.
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
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 */
--
2.9.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] HID: alps: fix stick device not working after resume
2016-09-19 7:41 [PATCH] HID: alps: fix stick device not working after resume Kai-Heng Feng
@ 2016-09-19 12:37 ` Jiri Kosina
2016-09-19 15:57 ` Kai Heng Feng
2016-09-22 9:08 ` Jiri Kosina
1 sibling, 1 reply; 6+ messages in thread
From: Jiri Kosina @ 2016-09-19 12:37 UTC (permalink / raw)
To: Kai-Heng Feng; +Cc: linux-input, linux-kernel, masaki.ota
On Mon, 19 Sep 2016, Kai-Heng Feng wrote:
> 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?
>
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> ---
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] HID: alps: fix stick device not working after resume
2016-09-19 12:37 ` Jiri Kosina
@ 2016-09-19 15:57 ` Kai Heng Feng
2016-09-21 12:00 ` Jiri Kosina
0 siblings, 1 reply; 6+ messages in thread
From: Kai Heng Feng @ 2016-09-19 15:57 UTC (permalink / raw)
To: Jiri Kosina; +Cc: linux-input, linux-kernel, masaki.ota
On Mon, Sep 19, 2016 at 8:37 PM, Jiri Kosina <jikos@kernel.org> wrote:
> On Mon, 19 Sep 2016, Kai-Heng Feng wrote:
>
>> 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.
>
>>
>> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
>> ---
>> 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
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] HID: alps: fix stick device not working after resume
2016-09-19 15:57 ` Kai Heng Feng
@ 2016-09-21 12:00 ` Jiri Kosina
2016-09-22 5:12 ` Kai Heng Feng
0 siblings, 1 reply; 6+ messages in thread
From: Jiri Kosina @ 2016-09-21 12:00 UTC (permalink / raw)
To: Kai Heng Feng; +Cc: linux-input, linux-kernel, masaki.ota
On Mon, 19 Sep 2016, Kai Heng Feng wrote:
> >> 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.
I'll fold this information into the patch changelog before comitting; if
you disagree, please let me know.
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] HID: alps: fix stick device not working after resume
2016-09-21 12:00 ` Jiri Kosina
@ 2016-09-22 5:12 ` Kai Heng Feng
0 siblings, 0 replies; 6+ messages in thread
From: Kai Heng Feng @ 2016-09-22 5:12 UTC (permalink / raw)
To: Jiri Kosina; +Cc: linux-input, linux-kernel, masaki.ota
On Wed, Sep 21, 2016 at 8:00 PM, Jiri Kosina <jikos@kernel.org> wrote:
> On Mon, 19 Sep 2016, Kai Heng Feng wrote:
>
>> >> 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.
>
> I'll fold this information into the patch changelog before comitting; if
> you disagree, please let me know.
That will be great.
Appreciate!
>
> --
> Jiri Kosina
> SUSE Labs
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] HID: alps: fix stick device not working after resume
2016-09-19 7:41 [PATCH] HID: alps: fix stick device not working after resume Kai-Heng Feng
2016-09-19 12:37 ` Jiri Kosina
@ 2016-09-22 9:08 ` Jiri Kosina
1 sibling, 0 replies; 6+ messages in thread
From: Jiri Kosina @ 2016-09-22 9:08 UTC (permalink / raw)
To: Kai-Heng Feng; +Cc: linux-input, linux-kernel, masaki.ota
On Mon, 19 Sep 2016, Kai-Heng Feng wrote:
> The stick device does not work after resume, add U1_SP_ABS_MODE flag can
> make the device work after resume.
>
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Applied with ammended changelog. Thanks,
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-09-22 9:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-19 7:41 [PATCH] HID: alps: fix stick device not working after resume Kai-Heng Feng
2016-09-19 12:37 ` Jiri Kosina
2016-09-19 15:57 ` Kai Heng Feng
2016-09-21 12:00 ` Jiri Kosina
2016-09-22 5:12 ` Kai Heng Feng
2016-09-22 9:08 ` Jiri Kosina
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.