Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3870220ybz; Tue, 28 Apr 2020 01:43:56 -0700 (PDT) X-Google-Smtp-Source: APiQypKEzfTbnblRNqNac86LCnpBlE6HrvH7NHblROfXI2VPq1Sv61KsL8oXAyHb/9zELQoxhGPL X-Received: by 2002:aa7:cdd9:: with SMTP id h25mr22504843edw.17.1588063435989; Tue, 28 Apr 2020 01:43:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588063435; cv=none; d=google.com; s=arc-20160816; b=mb6xUO/kHNUojRCBZ77/Oqy8Vqsvi5mSKvAutP9G0ywerjYkyf6yFHwcXi+XuckGn9 CzDG2VPrx+gcnKSqEen5VhT6DvZjKQr5f93NU98JGLu9D5WlFAiGmbFt2ClbOdrSjOtY XEHAa65mO8HxP/l2ijmVSOsiN4Hv7z5TBLtOinOetk19wwZS6AF1Tv2o98qFBNMTTXvU ai8bVQVuugoD0Uv09V8W/t63mtz5Uh3CH/sfSzm5brhuSXwQA33RyRxLayXUSd4qJlkJ dAX8kEx5GSDcnNvqt3X/F2HVvgQxvCKmNtj3tTxOXhyYCCcEDQ3pN1HT5z7pOebJt2Zr hCdQ== 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:dkim-signature; bh=5xO2curM8TPnAbNfzC7JBzZZ5XZ1U5vChbJBjLJxQNk=; b=APfBjDr8CmfjuLFfQAXN9mVd63HpQFffC+jEnScieK5x2rhN0CS/HGSly+UBvodSWZ fFwRlFbLvHNfnsswo1UOKT3sy4GkhfG1h0xgm1rNvLRGXgwMU+WKyDCL78XHETQpMpqX 8bkuYfvh0bdraz7/GB5X8uTEOPRD7ZV/DV1OvDOterfZE2teOYq91f7tnDPRqhjeNURS Gc7RTlZZ+P7bnPpBfq1hOzgDhw0lNi33KtdInLWwZVj4TRLSIz30FhsmDZ2wjHJqRRKn 6kbhq3Co7IzGmh5a2nlCznZ7TZR+PQ/O95ZW6c0/SwfiGATr7bTAwR0aSbuPd1n8HDse 9Rsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="N2x5E/y4"; 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 ch14si1426373ejb.304.2020.04.28.01.43.33; Tue, 28 Apr 2020 01:43:55 -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="N2x5E/y4"; 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 S1726857AbgD1Il4 (ORCPT + 99 others); Tue, 28 Apr 2020 04:41:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726641AbgD1Ilz (ORCPT ); Tue, 28 Apr 2020 04:41:55 -0400 Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7056FC03C1A9 for ; Tue, 28 Apr 2020 01:41:55 -0700 (PDT) Received: by mail-lj1-x241.google.com with SMTP id f11so15970759ljp.1 for ; Tue, 28 Apr 2020 01:41:55 -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; bh=5xO2curM8TPnAbNfzC7JBzZZ5XZ1U5vChbJBjLJxQNk=; b=N2x5E/y429xcQRwIsDERP9vgg9I9dC/YUkDuruDVAsHIt/13nZ36rdNqyA3IiSaMKI fteIk/m64SGiNnc7FWjaHwLxdZ67jYUW4ocSPeLMGxAICNfpHAv//GgkxNvumH33euIK XzEiX7nfsJ8J+osQj2FBVEEqWL7YchB44endof69ArlwVQNFJHCnPBgR6/48C24IZyQ0 LIzTloiEGcJcYGLjpOsAUU3qRRdw6emyQRC/klLcVcRtD6OKWxsL2ez8Vud95SG6usWr 4k5INzK4ews/ZWFOJMahVXyBtaynUrEKBrktop5h2GK/oPRCUAO6vD3WMdGkZEhQaKO7 FIQw== 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; bh=5xO2curM8TPnAbNfzC7JBzZZ5XZ1U5vChbJBjLJxQNk=; b=Yl1OEjAapDmbgg3NVCACCvbdp68TUffLFU/63SI6dempO13jxdLU3tyowRQ6g6ggwP gKE5XBCNqNF1Mfz/rs6SWhEcWLIhGTyB1U9XgFp8d2JwhcwnFPneLA0bQLTCySNpUTBu ODHnZL5ihC/7wkS2fb2SXu/9BEdTTq8knqREOzeSDVUUo5V9hyHBkPJT/0lmgy+u0hZ4 fiVl/VRrtlY8PTsBmp+UKW4XAgXvQwMmU+0LNLhJpUN4kYMSzwix3C+ownDyUFqMFNBl Ge5uVL81pMZPBow/ckCLtDgFLgIs4FBwXf+O7aOwJvysAHvS4OINRLzJPpDDAjW5V9Cg rZnQ== X-Gm-Message-State: AGi0PuYGEcSyfzs+Vn7e+wPkLxt7LPGc1/dOENkEaf+BUvxYA5L7RdS3 me6QTuoQzHYxFRU0S1O6rkPwyToNh4sZL/YoHZw= X-Received: by 2002:a2e:5746:: with SMTP id r6mr16565212ljd.15.1588063313948; Tue, 28 Apr 2020 01:41:53 -0700 (PDT) MIME-Version: 1.0 References: <20200427090518.GG3559@dell> <20200428071447.GJ3559@dell> <20200428081902.GK3559@dell> In-Reply-To: <20200428081902.GK3559@dell> From: Baolin Wang Date: Tue, 28 Apr 2020 16:41:42 +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" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 28, 2020 at 4:19 PM Lee Jones wrote: > > On Tue, 28 Apr 2020, Baolin Wang wrote: > > > On Tue, Apr 28, 2020 at 3:14 PM Lee Jones wrote: > > > > > > On Tue, 28 Apr 2020, Baolin Wang wrote: > > > > > > > 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 wrote: > > > > > > > > > > > > > > Some platforms such as Spreadtrum platform, define a special method to > > > > > > > update bits of the registers instead of read-modify-write, which means > > > > > > > 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_compatible. > > > > > > So long as the generic driver stays generic. Providing a registration > > > function sounds cleaner than tainting the code with vendor specifics. > > > > So seems my V1 patch set [1] was on the direction as you suggested, > > but Arnd did not like that. > > > > [1] > > https://lore.kernel.org/patchwork/patch/1226161/ > > https://lore.kernel.org/patchwork/patch/1226162/ > > I don't often disagree with Arnd, but in this instance I think a > registration function which allows vendor spin-offs to use the generic > API is better than tainting the generic driver by adding vendor > specific #ifery/code to it. > > Your original idea seems more palatable to me. OK, thanks for sharing your opinion. Let's see what Arnd's opinion before I send out new version. -- Baolin Wang