Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp3393163ybk; Tue, 19 May 2020 03:37:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBdft+Qu+5PPvEpGg+T5KqdFXsKVZoWOKEQgBdOk19FNoxMU+ySVAA+JINnNn6rdG9W+VQ X-Received: by 2002:a17:906:a0c2:: with SMTP id bh2mr47951ejb.406.1589884629521; Tue, 19 May 2020 03:37:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589884629; cv=none; d=google.com; s=arc-20160816; b=gkyrM3Ok2IrVWXAVQzcBgk7GZmdtIy/9GB8ksLacEXCBNH2g5vzx8qPNt0wBJ/ATfJ jq1SS4bPq1bXtu8nJEo8fddBVVSHhSx4fYffSQCGCTbRXDAlzqRSvlXlp1l8U+ggpAKN AN5xWSws4BiFn/FWN0hKATHE7CUhTmI6rJWx6q9gXGNXpxS2qPkBpuvMHhWV+L/S+u6F Hi+U7Ran+eDm/hjPyhfhGXBFBwU/ETu+jVVGZxS4SftWSbjb7unMD/ON2J2ouRuxkMxl 9Rvbuwnzj7+mpR3BMT1fLG/yjVU2KcGCo8HfQ9JXl2uP+GFJ2fvohxcZoYePbredNo/X j/yA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=HIzWuSV+k6FJhbDEx4nptdRHbD6AzRLTefY9kmB7ViA=; b=tyfiNcKDwmgtquokwA/82MxlPT6XzZJUmLzBCHCPIWdJbWvovU7JN539sztYrMfq7n D/3YN3QoE9MM/HZUouHNF7XS4y8cLvkZqws3UBLN4ntQzl2gwn148a8Hqc8XwSXff6g/ TdUF2J3ayrP8KeypxsthTGS/29CFljru8goz9iCs795d+fyjWbTj+P5Wmz8p792FyV7w GL0mxX2POsLwJHNivMNZfyAVuD8kk2VF6oNOcLauaxw8MDiFAgUuifKRDbMMjRjMPyng iQlgXQL0RreUuIaQpcJpRDvmWUMuXWnDHkAozHHJmAZWCqsDR8MBg8K7wnD9YntYAXoV omdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xEJadjap; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e4si8225134edm.144.2020.05.19.03.36.45; Tue, 19 May 2020 03:37:09 -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=@linaro.org header.s=google header.b=xEJadjap; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726735AbgESKfP (ORCPT + 99 others); Tue, 19 May 2020 06:35:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725911AbgESKfO (ORCPT ); Tue, 19 May 2020 06:35:14 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A685C061A0C for ; Tue, 19 May 2020 03:35:14 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id k13so13216179wrx.3 for ; Tue, 19 May 2020 03:35:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=HIzWuSV+k6FJhbDEx4nptdRHbD6AzRLTefY9kmB7ViA=; b=xEJadjapo2Y7f8mHAYd0MOvvh9qBYVxEe6UrFkD/KBi4A7urNSIz60SM5TP1c+PLzq 3r4pYDfQYUS4EPBK9mnPRDDfrI6fKrGexbmFibGuaa4rKvZhZce+zTQ4pvW4HX++fCvY AzmgLmojQmLhTgzsadFMQV0itgWqNippPRia7KJCpxwvQJCtEyI3owbNlN7JpniHBKjv LSO+FxUuLM9m426GwiqzjXV483fTd3QMy6cUNod6MwRi86HxK2pG7V/EgnSGR977XES5 HPGKR5MylfMkMRAI4TMqf/YMHZwB+1fkOzxNqq4lnLArMqfCJztMFCb4NtQbkT65SHFW o+qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=HIzWuSV+k6FJhbDEx4nptdRHbD6AzRLTefY9kmB7ViA=; b=ArX8ZI8RHedkrhy+qHKUtUWpv6MIAO4JAVEj7yuYBSjUKHlr1IwCePXhCJDvjcbTIQ V7MaaUhUxHfSaxjw/dDBWAzTvSJvzu5H2Cf0yvGpI60C8102bQMm0RrS5itKsiiSs7q9 1QXHjR21ZXkPchxwT3ov4lgeN0DHZNnwax7S4oP3RTabsiEFUWKm1QoFrft9UNKzPkv0 jSR4VKJStW7+ShMubFbh1vIn75Lbvd4r7WaYyVuaTrP6y7V4GYBHziOZoiJmJaDHFHyx 8FKL+PDF2XQwz2o6PrgFKjZoT1/vxvDcjCI8zSCytmLnLt0vaHwVGDXTTQf5HnAtzEL5 R9iA== X-Gm-Message-State: AOAM530UZUiUgPoGNv2pG7eCmGga6wzAfXG3DU+fT6mz5lumUNFSHiAJ 5G4nqzr0CccUfq5qdG/oz3OYJg== X-Received: by 2002:adf:fa0b:: with SMTP id m11mr24718798wrr.417.1589884513087; Tue, 19 May 2020 03:35:13 -0700 (PDT) Received: from dell ([2.31.163.63]) by smtp.gmail.com with ESMTPSA id 37sm20798815wrk.61.2020.05.19.03.35.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 03:35:12 -0700 (PDT) Date: Tue, 19 May 2020 11:35:10 +0100 From: Lee Jones To: Baolin Wang Cc: Arnd Bergmann , Mark Brown , Orson Zhai , Chunyan Zhang , LKML Subject: Re: [PATCH v3] mfd: syscon: Add Spreadtrum physical regmap bus support Message-ID: <20200519103510.GV271301@dell> References: <20200427090518.GG3559@dell> <20200428071447.GJ3559@dell> <20200428081902.GK3559@dell> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 04 May 2020, Baolin Wang wrote: > Hi Arnd > > On Tue, Apr 28, 2020 at 4:41 PM Baolin Wang wrote: > > > > 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. > > Do yo have any comments about how to add new bits updating method? Can > I re-send my v1 patch set [1]? Thanks. Just resend and we'll review. > [1]: > https://lore.kernel.org/patchwork/patch/1226161/ > https://lore.kernel.org/patchwork/patch/1226162/ > -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog