Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755581AbbFPViG (ORCPT ); Tue, 16 Jun 2015 17:38:06 -0400 Received: from us-mx2.synaptics.com ([192.147.44.131]:19462 "EHLO us-mx1.synaptics.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753814AbbFPViD (ORCPT ); Tue, 16 Jun 2015 17:38:03 -0400 X-PGP-Universal: processed; by securemail.synaptics.com on Tue, 16 Jun 2015 15:22:53 -0700 Message-ID: <55809739.4000207@synaptics.com> Date: Tue, 16 Jun 2015 14:38:01 -0700 From: Andrew Duggan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Benjamin Tissoires CC: , , Jiri Kosina , Peter Hutterer Subject: Re: [PATCH] HID: rmi: Disable populating F30 when the touchpad has physical buttons References: <1434488921-11839-1-git-send-email-aduggan@synaptics.com> <20150616212653.GA20909@mail.corp.redhat.com> In-Reply-To: <20150616212653.GA20909@mail.corp.redhat.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.4.10.145] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2181 Lines: 67 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 >> --- > 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 > > 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 >> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/