* [PATCH] HID: rmi: Disable populating F30 when the touchpad has physical buttons
@ 2015-06-16 21:08 Andrew Duggan
2015-06-16 21:26 ` Benjamin Tissoires
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Duggan @ 2015-06-16 21:08 UTC (permalink / raw)
To: linux-input, linux-kernel
Cc: Andrew Duggan, Jiri Kosina, Benjamin Tissoires, Peter Hutterer
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>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] HID: rmi: Disable populating F30 when the touchpad has physical buttons
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
2015-06-16 21:38 ` Andrew Duggan
0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Tissoires @ 2015-06-16 21:26 UTC (permalink / raw)
To: Andrew Duggan; +Cc: linux-input, linux-kernel, Jiri Kosina, Peter Hutterer
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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] HID: rmi: Disable populating F30 when the touchpad has physical buttons
2015-06-16 21:26 ` Benjamin Tissoires
@ 2015-06-16 21:38 ` Andrew Duggan
2015-06-16 21:41 ` Jiri Kosina
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Duggan @ 2015-06-16 21:38 UTC (permalink / raw)
To: Benjamin Tissoires; +Cc: linux-input, linux-kernel, Jiri Kosina, Peter Hutterer
On 06/16/2015 02:26 PM, Benjamin Tissoires wrote:
> 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?
Yes, I was able to reproduce the bug and confirm the fix on a Razer
Blade system.
> 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
>>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] HID: rmi: Disable populating F30 when the touchpad has physical buttons
2015-06-16 21:38 ` Andrew Duggan
@ 2015-06-16 21:41 ` Jiri Kosina
0 siblings, 0 replies; 4+ messages in thread
From: Jiri Kosina @ 2015-06-16 21:41 UTC (permalink / raw)
To: Andrew Duggan
Cc: Benjamin Tissoires, linux-input, linux-kernel, Peter Hutterer
Hi Andrew, Benjamin,
applied to for-4.2/rmi. Thanks,
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-06-16 21:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2015-06-16 21:38 ` Andrew Duggan
2015-06-16 21:41 ` Jiri Kosina
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).