From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3CD4AC18E5B for ; Tue, 17 Mar 2020 10:42:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 17F74206EC for ; Tue, 17 Mar 2020 10:42:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726057AbgCQKmZ (ORCPT ); Tue, 17 Mar 2020 06:42:25 -0400 Received: from mga06.intel.com ([134.134.136.31]:23878 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725730AbgCQKmY (ORCPT ); Tue, 17 Mar 2020 06:42:24 -0400 IronPort-SDR: AplRtMpY1kl8eiwXbK0UGW6Z5Klcs4VAZUqkAn5xJBqnHEVYJAo78Dk2ZfSdhxkXR7BkXH0gsV sGSecrkZi1JA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2020 03:42:24 -0700 IronPort-SDR: avYLoU5oKBnNWle2OyBEP5KMiCsT95QvG44wtlSDfOOZGq/StK1wl4Z0n2rgcUh84/QMi5Ky/K Rz5B6/MDFc3w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,564,1574150400"; d="scan'208";a="244439354" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga003.jf.intel.com with ESMTP; 17 Mar 2020 03:42:21 -0700 Received: from andy by smile with local (Exim 4.93) (envelope-from ) id 1jE9fz-00AQrU-OA; Tue, 17 Mar 2020 12:42:23 +0200 Date: Tue, 17 Mar 2020 12:42:23 +0200 From: Andy Shevchenko To: Martin Kepplinger Cc: dmitry.torokhov@gmail.com, m.felsch@pengutronix.de, mylene.josserand@bootlin.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Input: edt-ft5x06 - add fw_version debugfs file to read Message-ID: <20200317104223.GA1922688@smile.fi.intel.com> References: <20200316142756.25344-1-martin.kepplinger@puri.sm> <20200316144020.GN1922688@smile.fi.intel.com> <40d823d7-5873-2a3c-9f49-87fdb7428061@puri.sm> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <40d823d7-5873-2a3c-9f49-87fdb7428061@puri.sm> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 17, 2020 at 11:25:39AM +0100, Martin Kepplinger wrote: > On 16.03.20 15:40, Andy Shevchenko wrote: > > On Mon, Mar 16, 2020 at 03:27:56PM +0100, Martin Kepplinger wrote: > >> Add simple fw_version file in debugfs to read the value from 0xa6 > >> which is the firmware version. > > > > > > If you switch to regmap I²C API you will get this for free for all defined > > registers. > > > > So, I highly recommend to consider above. > > > > I don't know all the devices and modes well enough if the current raw > read/write buffers always translate to (only) buf[0] being the register > address. > > If you tell me I can assume just that, I'm happy to do a larger change > that completely does aways with the current raw buffers. I have only one device at hand, so, I can't tell for all neither. Maybe Dmitry has an opinion on this? > Otherwise: > > Does is make sense to *add* just a few regmap calls but keep the current > i2c_transfer in place for the calls I'm not sure about? I could do that > in any case. I think it's way to the opposite direction, i.e. increasing burden (for maintainability) and technical debt. -- With Best Regards, Andy Shevchenko