Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3366031ybz; Mon, 4 May 2020 01:24:14 -0700 (PDT) X-Google-Smtp-Source: APiQypJC/RqxecmPnkjm9mJAhkfpcEsKQaLnZO/ir2LqY1AtT0a7GxSzuXlp2/GnwLdFle1YUAtL X-Received: by 2002:aa7:d514:: with SMTP id y20mr13828308edq.28.1588580654807; Mon, 04 May 2020 01:24:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588580654; cv=none; d=google.com; s=arc-20160816; b=WVvbgevu8kZB5dKIR+FBoeD3UjMDTB2FKHMUhDC+zzHFPmpQSUlDs/fhDAcayWBHI0 qsV0El87aS4DYRMxbc5mY0BqDDPr0t2+gvrA4gTq6RrcThg18rHGKu8JWhQZFWCZnwgF aTS3csATPY1K2wxmVqtlm8fK6Swy09GYN4Sc3Gw7rl5xrlEHPT5ic47xEYozo8Ab8IgW +3oGys8V1w90hNx6f2L++eAY6zAGk8REak8zJp+gNAoZcfcpOG+DcUf0dJ0KVq6ctYXj j36NR709J5yr6gtJxe2yFD/pBwKvgZItouJA8YoJdX1eg9IR5CjWqFm9oPoq8EwEk/7b SAPw== 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=LUC+hpkyutV8S5+QH/c+7yUMtr6MEkXFCNyPSg7o1E4=; b=B4wHp91463Une7HblDV8yHMJ6cTt9bhcWcpQD65F+e9HwNQjq/kKG8o/Umf6ZWo6Mw W0Gu3gx0gHGqW6B/4ppzQRLYL3SOtL0e4gOPp8WgjNXA9JQutPLs1dBxYEiklMIlRddh 0o1x4xJC5fKHhdfEJjCQZ5xd/wsVMTtsVuPMboMMqW4TYU/il6RRG4kEQkUxA7W5cI0o 8MLckvBVdA3y0r3HllcgwacMYW/3zZtN8qLUEKyLinz1IDsohOyCCDa6K9f57xbjWgU6 r9QMxIgnHnBWjWQfa4BbJTWnU6yZ97LjKS9PO8KG7LnMlehEyP50zzfr//3nxWwb/hjk uI9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mU7VtKff; 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 x61si6191318ede.604.2020.05.04.01.23.51; Mon, 04 May 2020 01:24:14 -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=mU7VtKff; 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 S1728040AbgEDIVi (ORCPT + 99 others); Mon, 4 May 2020 04:21:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727100AbgEDIVh (ORCPT ); Mon, 4 May 2020 04:21:37 -0400 Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40ACEC061A0E for ; Mon, 4 May 2020 01:21:37 -0700 (PDT) Received: by mail-lj1-x243.google.com with SMTP id y4so8748889ljn.7 for ; Mon, 04 May 2020 01:21:37 -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=LUC+hpkyutV8S5+QH/c+7yUMtr6MEkXFCNyPSg7o1E4=; b=mU7VtKff+auNB64V3AYUSs2qQFmjPo0dWpA4Aoz+YTW586bZoIgSw9VhcFKYoSoBfw bOVl4yPbt3FTTuKTpCXuLlLeVDh36N2hicHfSEwZ6ADqZm9Jqn1GEp234DaD6oeCMmOw AZaF945jzYr94/9RAxcctlAIedKPuCORYhA4Xu3pRChnM6v2V1nLukexpBjDSVnzxYaJ 6oLKSWLSlC7wv/hpL82I8XWOxxGuN4wjxwqVFK7WuHRq6GbYTFMHtYdIbII3hjvIOohq VxfwloeIh2nwc6y+U8tcNEH8y+dpm6CqnAdlhytHJQT1H+d45sZGsW2kvvy1ldQXnx06 viPw== 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=LUC+hpkyutV8S5+QH/c+7yUMtr6MEkXFCNyPSg7o1E4=; b=Chog8oJWZzen3w7bSNvyzxxU6ZwnjgJLrI2JVwfPV9knjl8OXB9X1LWNJBKejrpXvj OUoY1uueOaaTxPRcrRvQJ9y+vmVXLkxx1X1gDogozimgm7mYtPRXJrjXIGbPSym1pnHE +yfOWp8NbHTz/AYf62dA/SyRMm7+mm7ohbfvzbsC/SsVWglcqzLBmpnlFNuq8vyv4ZBi +VCtEzFKy80ZEnZkJNj/wj9RIJR5ZNJ+xZ7uLDV2PLGHx+gjOEg1b3n872fdGjtvz5B1 MxDEUxX0btCLyMuqJMyvtpTXAnCz9kmvNuFX/V/qDaeHu5B9D+2yaz4ANxzGVxViP7bP Jatw== X-Gm-Message-State: AGi0PuZgeE/uBsVFB5PV+EX5bRYEdanVERj8fOzYmf8c5KFAQHTLW3X2 Wsdm2vNLLfUCuaOle4nc0hADTAoFSk3x1Rp8H3M= X-Received: by 2002:a2e:8603:: with SMTP id a3mr9843410lji.153.1588580495753; Mon, 04 May 2020 01:21:35 -0700 (PDT) MIME-Version: 1.0 References: <20200427090518.GG3559@dell> <20200428071447.GJ3559@dell> <20200428081902.GK3559@dell> In-Reply-To: From: Baolin Wang Date: Mon, 4 May 2020 16:21:22 +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 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. [1]: https://lore.kernel.org/patchwork/patch/1226161/ https://lore.kernel.org/patchwork/patch/1226162/ -- Baolin Wang