Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4661185pxu; Thu, 10 Dec 2020 02:12:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJx64Mq9QDLNctJVSpaFUocEzSaDxLUPRv2wHMrLyCinODm0ty3QjODDY+HWbz6UgqTX/K+O X-Received: by 2002:a05:6402:1692:: with SMTP id a18mr5883845edv.321.1607595172479; Thu, 10 Dec 2020 02:12:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607595172; cv=none; d=google.com; s=arc-20160816; b=qoNpSzlhdDDnVSIdFQVk/K2aqsJU/wePnQg09FH4s+NZ344ZlSpqhZBEqFRpXGFGB2 o+MXz82ClKop962pyvUV/GHOOIqVIjEg4eLmecRdNAszpQQaHLzKHGBn3+nGsJLcaR2Z MGdlbv3lNavkH8iyrwVXREVtgp4G4nbNjH4/EG7vEEH0eQvR94UgYGvS9ZMDAT1VxxY/ Y0KqyKEfuXRPY8vrtifgyo+HDGUrI0IaAv2ZXyyQJKRCjUpOsBUczfWcEw0zC2CzWAd3 jLzaxyTHxl3VA4+w70np2iyyuS6ZNASVBBP30DQgKSSjjl8yw68Yc940uoGwGtPYIdzq YaPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=SNT9g8WksKoCagQeGZmhuVQrxnb3bD4YlnxaKV3uQOU=; b=wLXsdKb7FbP0QPQo9e7cQoe+d1KVuA+5JFL3EOQcNEwYd9XMXBCzE4GhCbiQ8pgzZ6 mGgRI+VyRwe938AM/zfZ8PkCQsveUmNmARQ7rMuml+M7gD8izo3PYWonPUQqYWvBYBnO hyDYBU1SLI2WclCRAesYk676AOxdwn5n5kDAoddr8hcYp3O2fmJB/nSo2suYEX68PxG3 BPez1v5s2V4VYsQR1euuBvyCCL0yTu6nwSLteXAWOF7YGNfuAB3JcoMXlHpGanctqKAG dnGNV3MRTjSoaX5it3/cHFvFPbrUqkRgtnjc1uBxbZAiCgD9FB37fMwxyZPobith/tT3 LhVg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z10si2194008ejg.410.2020.12.10.02.12.29; Thu, 10 Dec 2020 02:12:52 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727931AbgLJKIs (ORCPT + 99 others); Thu, 10 Dec 2020 05:08:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726648AbgLJKIr (ORCPT ); Thu, 10 Dec 2020 05:08:47 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87994C0613D6 for ; Thu, 10 Dec 2020 02:08:07 -0800 (PST) Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1knIrk-0002lu-5r; Thu, 10 Dec 2020 11:08:04 +0100 Received: from mfe by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1knIrj-0002sH-Aa; Thu, 10 Dec 2020 11:08:03 +0100 Date: Thu, 10 Dec 2020 11:08:03 +0100 From: Marco Felsch To: Dmitry Torokhov Cc: linux-input@vger.kernel.org, Andy Shevchenko , Philipp Zabel , Simon Budig , linux-kernel@vger.kernel.org Subject: Re: [PATCH] Input: edt-ft5x06 - consolidate handling of number of electrodes Message-ID: <20201210100803.bfohc5fglvrwrtcz@pengutronix.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 11:03:13 up 8 days, 9 min, 25 users, load average: 0.05, 0.07, 0.07 User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: mfe@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dmitry, On 20-12-09 15:09, Dmitry Torokhov wrote: > Instead of using special-casing retrieval of number of X/Y electrodes > based on the firmware, let's select default values and mark registers as > non-existent on firmwares that do not support this operation. > > Also mark "report rate" register as non-existent for generic firmwares as > having it set to 0 does not make sense. > > Signed-off-by: Dmitry Torokhov > --- > drivers/input/touchscreen/edt-ft5x06.c | 43 ++++++++++---------------- > 1 file changed, 17 insertions(+), 26 deletions(-) > > diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c > index 6ff81d48da86..2eefbc2485bc 100644 > --- a/drivers/input/touchscreen/edt-ft5x06.c > +++ b/drivers/input/touchscreen/edt-ft5x06.c > @@ -69,6 +69,9 @@ ... > case EV_FT: > reg_addr->reg_threshold = EV_REGISTER_THRESHOLD; > + reg_addr->reg_report_rate = NO_REGISTER; > reg_addr->reg_gain = EV_REGISTER_GAIN; > reg_addr->reg_offset = NO_REGISTER; > reg_addr->reg_offset_x = EV_REGISTER_OFFSET_X; > reg_addr->reg_offset_y = EV_REGISTER_OFFSET_Y; > reg_addr->reg_num_x = NO_REGISTER; > reg_addr->reg_num_y = NO_REGISTER; > - reg_addr->reg_report_rate = NO_REGISTER; > break; Nit: Unrelated change. However the patch looks good, thanks. Acked-by: Marco Felsch Regards, Marco