Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1486216 > unrolled thread

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

Started byKai-Heng Feng <kai.heng.feng@canonical.com>
First post2016-09-19 09:50 +0200
Last post2016-09-22 11:10 +0200
Articles 6 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] HID: alps: fix stick device not working after resume Kai-Heng Feng <kai.heng.feng@canonical.com> - 2016-09-19 09:50 +0200
    Re: [PATCH] HID: alps: fix stick device not working after resume Jiri Kosina <jikos@kernel.org> - 2016-09-19 14:40 +0200
      Re: [PATCH] HID: alps: fix stick device not working after resume Kai Heng Feng <kai.heng.feng@canonical.com> - 2016-09-19 18:00 +0200
        Re: [PATCH] HID: alps: fix stick device not working after resume Jiri Kosina <jikos@kernel.org> - 2016-09-21 14:10 +0200
          Re: [PATCH] HID: alps: fix stick device not working after resume Kai Heng Feng <kai.heng.feng@canonical.com> - 2016-09-22 07:20 +0200
    Re: [PATCH] HID: alps: fix stick device not working after resume Jiri Kosina <jikos@kernel.org> - 2016-09-22 11:10 +0200

#1486216 — [PATCH] HID: alps: fix stick device not working after resume

FromKai-Heng Feng <kai.heng.feng@canonical.com>
Date2016-09-19 09:50 +0200
Subject[PATCH] HID: alps: fix stick device not working after resume
Message-ID<sj1uV-2ya-15@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1486428

FromJiri Kosina <jikos@kernel.org>
Date2016-09-19 14:40 +0200
Message-ID<sj61A-5sG-17@gated-at.bofh.it>
In reply to#1486216
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

[toc] | [prev] | [next] | [standalone]


#1486623

FromKai Heng Feng <kai.heng.feng@canonical.com>
Date2016-09-19 18:00 +0200
Message-ID<sj998-7ii-19@gated-at.bofh.it>
In reply to#1486428
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
>

[toc] | [prev] | [next] | [standalone]


#1488064

FromJiri Kosina <jikos@kernel.org>
Date2016-09-21 14:10 +0200
Message-ID<sjOvE-p7-15@gated-at.bofh.it>
In reply to#1486623
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

[toc] | [prev] | [next] | [standalone]


#1488537

FromKai Heng Feng <kai.heng.feng@canonical.com>
Date2016-09-22 07:20 +0200
Message-ID<sk4Ap-2ay-5@gated-at.bofh.it>
In reply to#1488064
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
>

[toc] | [prev] | [next] | [standalone]


#1488669

FromJiri Kosina <jikos@kernel.org>
Date2016-09-22 11:10 +0200
Message-ID<sk8b0-4nG-1@gated-at.bofh.it>
In reply to#1486216
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web