Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3794346ybz; Tue, 28 Apr 2020 00:08:16 -0700 (PDT) X-Google-Smtp-Source: APiQypKkYfHR7zvaOxFQBFqfys3XE5+wk1Iu7viQe0/RXfVFzjH1+FF1MTbHh7t+L9TsZdQeSgfT X-Received: by 2002:a50:da4a:: with SMTP id a10mr21716141edk.158.1588057696092; Tue, 28 Apr 2020 00:08:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588057696; cv=none; d=google.com; s=arc-20160816; b=1HKfmorrucSJd5ndMnZ/MFiaJr+p5LAsI51DgTWEolxLI7kz0BbpQy6DQALl+HK1kb fyOvmzJ1mOuRFZTrUGP3uZ7qBqfiyXSTpWrSvmbwb86qr8wzSHivkUpSj73oQjA1aslI nElRRcnW4fg12eCAzgHsp+6BnwVTXL8SNK8AOakzx/2nGxVej/e1zaI7JKutanWgC1Az tJERzy/XW/rvrihfUHg4GZECklJqDNlhKPPrj1sDnFiX/nRdLyOkGNWOZdArP4Iu9/aB oTj/2c1rlwfmGBo8vVC+7xXwXKuEvbBk1bY9a+L700k7DB4+yTWtcA5vy1RdcBPOWlox hJ0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=f8dcXHpZYKAipoXZGyaEz/tWNqY1LAbrIqWxYKIaqms=; b=YVYQn95Fz+K0cAGItpF3bg3b8ss5rH/CBCpEAnIzSJ/i41N263n5CTz7/f0eJ8J2bK D9nSvKgULg4YjOaJIbHY/S+zMGOvT6/p074H65jy+8obEabX8sdl2uZ5aBurrI7SFHU2 arrNwirV499Pdyfp031Joy1+waA9eoR2X2pXUBmXTa9wExTyOHSWhracTwn5HPM54+0K J/knT0/Qtr6FIA3aAnKI9IoqTjSfLcrcWUozpcZb+S2uaBiGFyo8dWX4hJoTtNCMBJng i5iXV62jP1mPEVx4m7/g2co57QF7D+ji94OxT27VrA3eGIskvJ0JsrPwpZLgVUf3ZgV0 YPzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RfxPovGh; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d9si1369250ejb.387.2020.04.28.00.07.53; Tue, 28 Apr 2020 00:08:16 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RfxPovGh; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726457AbgD1HGf (ORCPT + 99 others); Tue, 28 Apr 2020 03:06:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725917AbgD1HGe (ORCPT ); Tue, 28 Apr 2020 03:06:34 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D971C03C1A9 for ; Tue, 28 Apr 2020 00:06:34 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id y4so20303941ljn.7 for ; Tue, 28 Apr 2020 00:06:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=f8dcXHpZYKAipoXZGyaEz/tWNqY1LAbrIqWxYKIaqms=; b=RfxPovGhXqLMR84oBjNHQnl7m08K/jrND9sk0zk7DoGrMWX+qWHr43W16a8/Ob00dF ecgyq1eDECALCl0Jymc6gxk8+vpNgufOKcSPfdDGa2LIkiRhm1zJ3yajX0ffjNFLCVXn iuCTAmoT/unRNx/pQPXpUYo8NVf6DW0QTDCyvV+MJ1qsyggUfuZmmj1WFydd+cztcHCB bB+MIJNVQgT7elVp6TcK9tsksxpZfc/wrlPPMC0cyhM2xQrPpryf/G3xIwktqaQ3ZSch 1IqfUOc8o4KwbCpRU1oHNX89FEj4+oVS3EOtdwxukmxmD/MOG2cNF0P4F9H2vWfoPjVQ eJpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=f8dcXHpZYKAipoXZGyaEz/tWNqY1LAbrIqWxYKIaqms=; b=Nel/LSmy8n0pHu8ohYOUIMGkq17fqy9EgKR+DdrGMER8BmfoRYyb0QadatPJofFsxc C19Gfv74jjcLpQPXEMUoIV0VY+IxCXJ1Or6mc+noN7H2KkNmjF4ls83mKNAEsRG3lN6L iE/cI+BxZtPr0/ryRTvJ0fZiWOOAbyloNS+jM4iEkSai1IFdq7HwG+R10w7fwgUQk+tE vDgScPaY3moBNRi8kPK3fmJUcG3JnMGk2R10O81a9XMpjHxoeND4lbM5c7gmGcPQvyFi paTv/ucUFb2uisjqi6/ZEjPBJGTMUVcYhDJbgf8K4YGsVw2pakgIq/f6HSrXnuzvFTFj Yj3g== X-Gm-Message-State: AGi0PuaajGn8z/zNIvE3BiF6GcHDGEpIbcDLJhtB0VdBgJofX3ToV0Be iqpW2fUMq3KXDfomzQX2qKKvd3BS+icYhi/Q3DU= X-Received: by 2002:a2e:9818:: with SMTP id a24mr16591112ljj.126.1588057592851; Tue, 28 Apr 2020 00:06:32 -0700 (PDT) MIME-Version: 1.0 References: <20200427090518.GG3559@dell> In-Reply-To: <20200427090518.GG3559@dell> From: Baolin Wang Date: Tue, 28 Apr 2020 15:06:21 +0800 Message-ID: Subject: Re: [PATCH v3] mfd: syscon: Add Spreadtrum physical regmap bus support To: Lee Jones Cc: Arnd Bergmann , Mark Brown , Orson Zhai , Chunyan Zhang , LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 27, 2020 at 5:05 PM Lee Jones wrote: > > On Mon, 27 Apr 2020, Baolin Wang wrote: > > > Hi Arnd and Lee, > > > > On Tue, Apr 21, 2020 at 10:13 PM Baolin Wang w= rote: > > > > > > Some platforms such as Spreadtrum platform, define a special method t= o > > > update bits of the registers instead of read-modify-write, which mean= s > > > we should use a physical regmap bus to define the reg_update_bits() > > > operation instead of the MMIO regmap bus. Thus we can register a new > > > physical regmap bus into syscon core to support this. > > > > > > Signed-off-by: Baolin Wang > > > > Do you have any comments for this patch? Thanks. > > Yes. I'm not accepting it, sorry. > > I'd rather you duplicate the things you need from of_syscon_register() > in your own driver than taint this one. Thanks for your comments and I can understand your concern. But we still want to use the standard syscon APIs in syscon.c, which means we still need insert an callback or registration or other similar methods to support vendor specific regmap bus. Otherwise we should invent some similar syscon APIs in our vendor syscon driver, like sprd_syscon_regmap_lookup_by_phandle/sprd_syscon_regmap_lookup_by_compatibl= e. Arnd, what do you think? Thanks. > > > --- > > > Changes from v2: > > > - Fix building errors without enabling CONFIG_ARCH_SPRD. > > > > > > Changes from v1: > > > - Add WARN_ONCE() for seting bits and clearing bits at the same time= . > > > - Remove the Spreadtrum SoC syscon driver, instead moving the regmap= _bus > > > instance into syscon.c driver. > > > > > > Changes from RFC v2: > > > - Drop regmap change, which was applied by Mark. > > > - Add more information about how to use set/clear. > > > - Add checking to ensure the platform is compatible with > > > using a new physical regmap bus. > > > > > > Changes from RFC v1: > > > - Add new helper to registers a physical regmap bus instead of > > > using the MMIO bus. > > > --- > > > drivers/mfd/syscon.c | 83 ++++++++++++++++++++++++++++++++++++++++++= -- > > > 1 file changed, 81 insertions(+), 2 deletions(-) > > -- > Lee Jones [=E6=9D=8E=E7=90=BC=E6=96=AF] > Linaro Services Technical Lead > Linaro.org =E2=94=82 Open source software for ARM SoCs > Follow Linaro: Facebook | Twitter | Blog --=20 Baolin Wang