linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
To: Andrew Duggan <aduggan@synaptics.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jiri Kosina <jkosina@suse.cz>,
	Peter Hutterer <peter.hutterer@who-t.net>
Subject: Re: [PATCH] HID: rmi: Disable populating F30 when the touchpad has physical buttons
Date: Tue, 16 Jun 2015 17:26:54 -0400	[thread overview]
Message-ID: <20150616212653.GA20909@mail.corp.redhat.com> (raw)
In-Reply-To: <1434488921-11839-1-git-send-email-aduggan@synaptics.com>

Hi Andrew,

On Jun 16 2015 or thereabouts, Andrew Duggan wrote:
> Physical buttons do not use F30 to report their state and in some cases the
> data reported in F30 is incorrect and inconsistent with what is reported by
> the HID descriptor. When physical buttons are present, ignore F30 and let
> hid-input report buttons based on what is defined in the HID descriptor.
> 
> Signed-off-by: Andrew Duggan <aduggan@synaptics.com>
> ---

Thanks for the patch.
This one is related to:
https://bugzilla.redhat.com/show_bug.cgi?id=1227891
and http://bugs.freedesktop.org/show_bug.cgi?id=90356

Andrew, can you confirm that with this patch, INPUT_PROP_BUTTONPAD is not
set for the Razer Blade touchpad?

If so, then this is:
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Cheers,
Benjamin

>  drivers/hid/hid-rmi.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/hid/hid-rmi.c b/drivers/hid/hid-rmi.c
> index 368ffdf..721f7f9 100644
> --- a/drivers/hid/hid-rmi.c
> +++ b/drivers/hid/hid-rmi.c
> @@ -1013,6 +1013,7 @@ static int rmi_populate_f30(struct hid_device *hdev)
>  
>  static int rmi_populate(struct hid_device *hdev)
>  {
> +	struct rmi_data *data = hid_get_drvdata(hdev);
>  	int ret;
>  
>  	ret = rmi_scan_pdt(hdev);
> @@ -1033,9 +1034,11 @@ static int rmi_populate(struct hid_device *hdev)
>  		return ret;
>  	}
>  
> -	ret = rmi_populate_f30(hdev);
> -	if (ret)
> -		hid_warn(hdev, "Error while initializing F30 (%d).\n", ret);
> +	if (!(data->device_flags & RMI_DEVICE_HAS_PHYS_BUTTONS)) {
> +		ret = rmi_populate_f30(hdev);
> +		if (ret)
> +			hid_warn(hdev, "Error while initializing F30 (%d).\n", ret);
> +	}
>  
>  	return 0;
>  }
> -- 
> 2.1.4
> 

  reply	other threads:[~2015-06-16 21:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-16 21:08 [PATCH] HID: rmi: Disable populating F30 when the touchpad has physical buttons Andrew Duggan
2015-06-16 21:26 ` Benjamin Tissoires [this message]
2015-06-16 21:38   ` Andrew Duggan
2015-06-16 21:41     ` Jiri Kosina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150616212653.GA20909@mail.corp.redhat.com \
    --to=benjamin.tissoires@redhat.com \
    --cc=aduggan@synaptics.com \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter.hutterer@who-t.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).