From: Lee Jones <lee.jones@linaro.org>
To: Baolin Wang <baolin.wang7@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>, Mark Brown <broonie@kernel.org>,
Orson Zhai <orsonzhai@gmail.com>,
Chunyan Zhang <zhang.lyra@gmail.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] mfd: syscon: Add Spreadtrum physical regmap bus support
Date: Tue, 19 May 2020 11:35:10 +0100 [thread overview]
Message-ID: <20200519103510.GV271301@dell> (raw)
In-Reply-To: <CADBw62psCr1aSmYtqck5dpddCRk8f-UAw5rUsPyfhNw-OCfYkA@mail.gmail.com>
On Mon, 04 May 2020, Baolin Wang wrote:
> Hi Arnd
>
> On Tue, Apr 28, 2020 at 4:41 PM Baolin Wang <baolin.wang7@gmail.com> wrote:
> >
> > On Tue, Apr 28, 2020 at 4:19 PM Lee Jones <lee.jones@linaro.org> wrote:
> > >
> > > On Tue, 28 Apr 2020, Baolin Wang wrote:
> > >
> > > > On Tue, Apr 28, 2020 at 3:14 PM Lee Jones <lee.jones@linaro.org> wrote:
> > > > >
> > > > > On Tue, 28 Apr 2020, Baolin Wang wrote:
> > > > >
> > > > > > On Mon, Apr 27, 2020 at 5:05 PM Lee Jones <lee.jones@linaro.org> wrote:
> > > > > > >
> > > > > > > On Mon, 27 Apr 2020, Baolin Wang wrote:
> > > > > > >
> > > > > > > > Hi Arnd and Lee,
> > > > > > > >
> > > > > > > > On Tue, Apr 21, 2020 at 10:13 PM Baolin Wang <baolin.wang7@gmail.com> 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 <baolin.wang7@gmail.com>
> > > > > > > >
> > > > > > > > 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
next prev parent reply other threads:[~2020-05-19 10:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-21 14:13 [PATCH v3] mfd: syscon: Add Spreadtrum physical regmap bus support Baolin Wang
2020-04-27 7:23 ` Baolin Wang
2020-04-27 9:05 ` Lee Jones
2020-04-28 7:06 ` Baolin Wang
2020-04-28 7:14 ` Lee Jones
2020-04-28 8:09 ` Baolin Wang
2020-04-28 8:19 ` Lee Jones
2020-04-28 8:41 ` Baolin Wang
2020-05-04 8:21 ` Baolin Wang
2020-05-19 10:35 ` Lee Jones [this message]
2020-05-19 13:10 ` Baolin Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200519103510.GV271301@dell \
--to=lee.jones@linaro.org \
--cc=arnd@arndb.de \
--cc=baolin.wang7@gmail.com \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=orsonzhai@gmail.com \
--cc=zhang.lyra@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.