Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1200274ybt; Thu, 18 Jun 2020 03:03:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxc8kJbbzguYWPRg4M9xevbvsTCPEGEgSyop7B9PcsCmTfD0BZp5BsGL36iWnt0SnEKAusL X-Received: by 2002:aa7:de08:: with SMTP id h8mr3202860edv.164.1592474600296; Thu, 18 Jun 2020 03:03:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592474600; cv=none; d=google.com; s=arc-20160816; b=Ya5ziER/VKfNtonMKQV3x/MHXJryY7K6uF76pWB3khB1SjQUOaEXugzTa5TAO4TUiM +kFLHUVAW+eklCB62MIw+2wfqxm9VdVbFhfs1ZIlF58eeuH080+Qf49uTKK98krsi+eY md0Pq8i1gADxxcziIzUJl/oKJciDoBGkDhdjMkkSG6f61twQWSVDJqRKjGVGl8eJhXsC IUkcgTDcCJuS7eAsX78txT8kYwWnAYbXS0WZSHmJcKoxkCB0URhoD56iDnR1qypzGp7g AQd3w3o/dI3FAzzDsJJF3koUC+7hEr8MNdL1jWfMpyIyyr6Nmqa0lDQmzEv3OsgiA3Bl CbCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=G+tCi3a65xvCTdS0bqot3Q65ahjQrew/H1g/NlB9zto=; b=YdVld22ldiWT4kyXs2gd63XUICx2xBW51rmua2WdQU6ixW4AR5biRJiAx3EiVZ83NV 1eJp3h3jwo3BamPd5/DaajZcCXbJ1rvfaxwy1TsTCsnMDl3aHCvCu7hDC9ywG2LHNvAu xVV4Eg2Xg3uT52OMsiDbCWcw+x7l4jH5Ypx8LtdizU3HrCMQWkE4p73kCn022nl8tR+q LI/n2dFvCCE4ytmjGPyT14oHIIW10GTjxzSzb5DxaOcrZnuy/Wh9+pp55fjJDpMTjJ7n vQ0o9tV1n8dx049k7p/WlHDlRaEzdPhIOLc6kRjiHEb2AbJ9LSY6Miih/InI2xnD46h2 f5Cg== 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 si8si1708170ejb.7.2020.06.18.03.02.57; Thu, 18 Jun 2020 03:03:20 -0700 (PDT) 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 S1729146AbgFRJ3h (ORCPT + 99 others); Thu, 18 Jun 2020 05:29:37 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:40673 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729014AbgFRJ3g (ORCPT ); Thu, 18 Jun 2020 05:29:36 -0400 Received: from mail-qt1-f181.google.com ([209.85.160.181]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.145]) with ESMTPSA (Nemesis) id 1Mkpj7-1j22dt0gCV-00mKSt; Thu, 18 Jun 2020 11:29:34 +0200 Received: by mail-qt1-f181.google.com with SMTP id y1so3848159qtv.12; Thu, 18 Jun 2020 02:29:33 -0700 (PDT) X-Gm-Message-State: AOAM532px3Vm8oMcgKXDNs5qMUOQlMUtdsGcLyXBQQq31mCPkMbW+S8d ymjYDs/z/sAxvBWYpZuWeAnJb+BqkVBvP4kfhnA= X-Received: by 2002:ac8:1844:: with SMTP id n4mr3356547qtk.142.1592472572907; Thu, 18 Jun 2020 02:29:32 -0700 (PDT) MIME-Version: 1.0 References: <20200618080223.951737-1-lee.jones@linaro.org> In-Reply-To: <20200618080223.951737-1-lee.jones@linaro.org> From: Arnd Bergmann Date: Thu, 18 Jun 2020 11:29:16 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 1/1] mfd: Add I2C based System Configuaration (SYSCON) access To: Lee Jones Cc: michael@walle.cc, Rob Herring , Mark Brown , gregkh , Andy Shevchenko , DTML , Linus Walleij , Bartosz Golaszewski , Linux ARM , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:mJn8YsYvecBQHNzW2F014KvvXMMCXXUSdpntKRjYKP8FlCPGqOE gVc/v9hqPBEvM7gXD94bvAvORSYxC7R32rBSY8tYbSc1Kv45vHgm2yfQzUfwsd1HhtY68vg ZqBW4aH3eCMtOAiS146tG2nY3TBNnc41Np7kyD78KmyS1DzBJua4Bm+/zqQOXJnltf7JE5/ SIiIIy6Y6ptBLBoqQ78Zg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:aJNVddY0ieA=:SGaGsC5HsbFxsXW3/fZvfk MgAK6no/aF1IbmEEuXZtshDPqmpwCbVPYgJr4sWqJ0W6us9taTpnDSZd3NCuAlV3J7xK2ZgyZ gZZUr1/M++LWwmMaQUEZfzR9eqYeSlfQ72T5LR5ejGTZM7rvwueA55EsGBASCICw0rTcSwjOi iAZtztev/PJOvbnYwweTiMqXC2cOBuUgSxDNwH5/wqbEvCxIv/BtV8icGfnR66cU4x/fmuIIy yIEozTnqqzn4owr5Jm6dihYjFF0sFNv2mVkDtan/D9eUd91ZoDYkcs2px3IViFO1SyeWf5t+w E+zjFineyeJTSfrdiFfzOnlcBM/RbO6tdTzjD2sc5v6/z7dQ0FYz07DEUjtPQcLciSb6KaYuT NK+f0SoYTJ6twF4YMZxYXtTsDnGSm91v4JwXKdEuiPM2emULTUESrsc6L1OQIr1sBj9N9Y9CZ Zwq5Jw/5mMPWhXQ8AHFoGBvruuBgEriPYq3wW7suL//sCoOB/mUkroDq8r6g2PmLVfGRc7WJ8 Od/3rjN7DPdC2xBiVM2+FECUaU+7szCGUAymSLIr6/NASZo/tj4xqyZ4Oxpb2IBHpPDJ03+N+ 0K3O2yCyL1rLLBOcqGv9ZD/sorH25rHNLimogocZeAZAvqtJJDZy0DjrcIT2njBl/npUDoWdR ZdBgfHkxK9wxbicr4eJSGSuLStcQrxIj7hU57FgbrI0mRsWJYtF4zu+8+prG9NrvylGI0nXxw D6jOKOUQVO1jf0O7y3iIXOm/DKdhNwfnCqGTmoaIInUCGw6j9dR0pVmsfyapuyLnr3CMPyIb6 nzFRQG/pruKhGInthnHS0cT3ewWRfsGMLtuuqmf3KuFX1EsmQA= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 18, 2020 at 10:03 AM Lee Jones wrote: > > The existing SYSCON implementation only supports MMIO (memory mapped) > accesses, facilitated by Regmap. This extends support for registers > held behind I2C busses. > > Signed-off-by: Lee Jones The implementation looks fine to me, but can you explain how this is going to be used, and what the advantage is over open-coding the devm_regmap_init_i2c() in each driver that would use this? Is this about using proper locking through the regmap framework for shared i2c clients, or to reduce memory consumption when lots of drivers access the same regmap? My impression of the existing syscon code is that the main value-add over other ways of doing the same is the syscon_regmap_lookup_by_phandle() interface that gives other drivers a much simpler way of getting the regmap just based on the DT node. Are you planning to add something like that here as well? An ideal driver interface might allow syscon_regmap_lookup_by_phandle() to work for both mmio and i2c based syscons, or additional ones as well, but implementing this would be rather tricky when the i2c core is a loadable module. Arnd