From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752427AbdBUVQ3 (ORCPT ); Tue, 21 Feb 2017 16:16:29 -0500 Received: from us-mx1.synaptics.com ([192.147.44.131]:27640 "EHLO us-mx1.synaptics.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751628AbdBUVQV (ORCPT ); Tue, 21 Feb 2017 16:16:21 -0500 Subject: Re: [PATCH] HID: rmi: fallback to generic/multitouch if hid-rmi is not built (was Re: [GIT PULL] HID for 4.11) To: Jiri Kosina , Linus Torvalds References: CC: Linux Kernel Mailing List , Benjamin Tissoires , From: Andrew Duggan Message-ID: <9a85e1ef-59c0-3017-910b-d5e9de3fd4c5@synaptics.com> Date: Tue, 21 Feb 2017 13:16:20 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.4.10.103] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/21/2017 06:17 AM, Jiri Kosina wrote: > On Mon, 20 Feb 2017, Linus Torvalds wrote: > >>> I'll have a more specific commit (or range) soon. >> Hmm. It's commit 279967a65b32 ("HID: rmi: Handle all Synaptics >> touchpads using hid-rmi"). >> >> And the reason seems to be stupid: I don't have RMI enabled at all, >> because that didn't use to work or make a difference. >> >> Maybe that "let's use RMI" code should depend on RMI actually being >> enabled? Because as-is, that code now breaks existing configurations. > I agree; that's in line with what we usually try to stick to (force > specific drivers if the device doesn't work with the generic at all and > switch over to generic in compile-time for devices that have limited > functionality with the generic driver). > > Andrew, Benjamin, how about the patch below? > I tested this patch and hid-core now correctly binds hid-mulitouch to the touchpad if CONFIG_HID_RMI is disabled. Sorry, about the oversight. Tested-by: Andrew Duggan Thanks, Andrew > > > From: Jiri Kosina > Subject: [PATCH] HID: rmi: fallback to generic/multitouch if hid-rmi is not built > > Commit 279967a65b32 ("HID: rmi: Handle all Synaptics touchpads using hid-rmi") > unconditionally switches over handling of all Synaptics touchpads to hid-rmi > (to make use of extended features of the HW); in case CONFIG_HID_RMI is > disabled though this renders the touchpad unusable, as the > > HID_DEVICE(HID_BUS_ANY, HID_GROUP_RMI, HID_ANY_ID, HID_ANY_ID) > > match doesn't exist and generic/multitouch doesn't bind to it either (due > to hid group mismatch). > > Fix this by switching over to hid-rmi only if it has been actually built. > > Fixes: 279967a65b32 ("HID: rmi: Handle all Synaptics touchpads using hid-rmi") > Reported-by: Linus Torvalds > Signed-off-by: Jiri Kosina > --- > drivers/hid/hid-core.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c > index 538ff697a4cf..e9e87d337446 100644 > --- a/drivers/hid/hid-core.c > +++ b/drivers/hid/hid-core.c > @@ -827,7 +827,8 @@ static int hid_scan_report(struct hid_device *hid) > * hid-rmi should take care of them, > * not hid-generic > */ > - hid->group = HID_GROUP_RMI; > + if (IS_ENABLED(CONFIG_HID_RMI)) > + hid->group = HID_GROUP_RMI; > break; > } > >