Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4075949pxu; Wed, 9 Dec 2020 07:48:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJxuppDKi8JOOAfKpRdcTL79Dgb2ldFxolcog51e5rgb4B7wBPI/ta4lIE+dA6So8LYROSCr X-Received: by 2002:a50:a694:: with SMTP id e20mr2564566edc.261.1607528926252; Wed, 09 Dec 2020 07:48:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607528926; cv=none; d=google.com; s=arc-20160816; b=iStbjkA0oV59f0BSnt+lwx5ZOxSBhPmm4b29PqVn0WyT0vCOl7BFFfNQpckkFnYBcM 2jyGy8+MT5ZT4ojSVR2QBemQvZQ9SdWbCCtQCslCmKvsIeH4/nhd+6dcG03UqcUiwrsD BixpArgNFGI/oiIsxBARRFHPUd6SjmZz9Pnde2I9B2BbEsGqUZTU6qNRQ0QleeW/E87g F+HiTmCKvq8WyaI/JXZEdAXcaOMvz5FM87GRwEMWoRkeYNWXcWeoKGaEraXKrf4DNa+J /IfO/OdDEN9pBotp0D+6CADZf+3XLVLR/m7BLtg7U0aKsbwbaP0qGCN2uYmWznCWP+VB qbGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:dkim-signature:date; bh=rU82wnFiuajmrD4To198HSxdu5sUtBKhRWBz/qVNMTY=; b=x4nDLXjpiXM/4aArInJ1KZW6cSyuzC79lFzl3+y5rgMr604TWoc5NnEHvxuPLWyKeb I5Unc8ILa1gJPJ1O27MVEeGCkuS61ZXHejJWH1OSngM6NI6YbPuFWfpIWAZobvpa9IVC BJyxXZ8UJBYeRjSxSu/G5HyCpVQUKtY3Q9Lh9Wjh5equLAoRMROEHKndqrsaT7VDr9lK KIdJA2JI3mULcLGWcu+NlDeyD0CWq5wwzKMAuuVq9jxjuwa2JY2UQ/2puNnMhIAf6buz AjRGx7dSvvjp+XiMhQH+S1O9zd01wGuLUdGJedduAsONORya7y1JNJ/XpPkRClR7KZhs IKkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kuXo8ntC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y9si1040266edq.205.2020.12.09.07.48.22; Wed, 09 Dec 2020 07:48:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kuXo8ntC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730664AbgLIPoG (ORCPT + 99 others); Wed, 9 Dec 2020 10:44:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:45744 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730595AbgLIPoA (ORCPT ); Wed, 9 Dec 2020 10:44:00 -0500 Date: Wed, 9 Dec 2020 16:44:35 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1607528599; bh=aQdUBcJzGs5sTFOVkJKkVgfaR/1cjLXqFj5iEQWhGWs=; h=From:To:Cc:Subject:References:In-Reply-To:From; b=kuXo8ntCTJ9f422Po8LLL06bKV6gUowSc/t6knG0gvyJ5h3/ttKFIBgZoGkM5zNuO o1YQgS8WpLfaerJqM+LfKQAhxy78iDcq7EexAiTzGFnX56yAz3RCSqLWZOB2sjPOgt UujRul97sJl1QRGeq2f5T1xOSPGyqFKFzyeAUrTg= From: Greg KH To: =?utf-8?Q?Barnab=C3=A1s_P=C5=91cze?= Cc: Coiby Xu , "linux-input@vger.kernel.org" , Helmut Stult , Baq Domalaq , Pedro Ribeiro , "stable@vger.kernel.org" , Jiri Kosina , Benjamin Tissoires , open list Subject: Re: [PATCH v4] HID: i2c-hid: add polling mode based on connected GPIO chip's pin status Message-ID: References: <20201125141022.321643-1-coiby.xu@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 09, 2020 at 03:38:11PM +0000, Barnabás Pőcze wrote: > 2020. december 9., szerda 8:00 keltezéssel, Greg KH írta: > > > On Tue, Dec 08, 2020 at 09:59:20PM +0000, Barnabás Pőcze wrote: > > > > > 2020. november 25., szerda 16:07 keltezéssel, Greg KH írta: > > > > > > > [...] > > > > > > > > > +static u8 polling_mode; > > > > > +module_param(polling_mode, byte, 0444); > > > > > +MODULE_PARM_DESC(polling_mode, "How to poll (default=0) - 0 disabled; 1 based on GPIO pin's status"); > > > > > > > > Module parameters are for the 1990's, they are global and horrible to > > > > try to work with. You should provide something on a per-device basis, > > > > as what happens if your system requires different things here for > > > > different devices? You set this for all devices :( > > > > [...] > > > > > > Hi > > > do you think something like what the usbcore has would be better? > > > A module parameter like "quirks=::[,::]*"? > > > > Not really, that's just for debugging, and asking users to test > > something, not for a final solution to anything. > > My understanding is that this polling mode option is by no means intended > as a final solution, it's purely for debugging/fallback: > > "Polling mode could be a fallback solution for enthusiastic Linux users > when they have a new laptop. It also acts like a debugging feature. If > polling mode works for a broken touchpad, we can almost be certain > the root cause is related to the interrupt or power setting." > > What would you suggest instead of the module parameter? a debugfs file? That means it's only for debugging and you have to be root to change the value. thanks, greg k-h