From: Lee Jones <lee.jones@linaro.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Baolin Wang <baolin.wang7@gmail.com>,
Mark Brown <broonie@kernel.org>, Orson Zhai <orsonzhai@gmail.com>,
Lyra Zhang <zhang.lyra@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] mfd: syscon: Support physical regmap bus
Date: Fri, 24 Apr 2020 09:32:55 +0100 [thread overview]
Message-ID: <20200424083255.GQ3612@dell> (raw)
In-Reply-To: <CAK8P3a1e15P6xRUgYLYxT8XUx7FREbs5mMbfL1Qj+qwoDfFX+Q@mail.gmail.com>
On Fri, 24 Apr 2020, Arnd Bergmann wrote:
> On Fri, Apr 24, 2020 at 10:11 AM Lee Jones <lee.jones@linaro.org> wrote:
> > On Fri, 17 Apr 2020, Baolin Wang wrote:
> > > @@ -106,14 +107,25 @@ static struct syscon *of_syscon_register(struct device_node *np, bool check_clk)
> > > syscon_config.val_bits = reg_io_width * 8;
> > > syscon_config.max_register = resource_size(&res) - reg_io_width;
> > >
> > > - regmap = regmap_init_mmio(NULL, base, &syscon_config);
> > > + /*
> > > + * The Spreadtrum syscon need register a real physical regmap bus
> > > + * with new atomic bits updating operation instead of using
> > > + * read-modify-write.
> > > + */
> > > + if (IS_ENABLED(CONFIG_ARCH_SPRD) &&
> > > + of_device_is_compatible(np, "sprd,atomic-syscon") &&
> >
> > Please find a more generic way of supporting your use-case. This is a
> > generic driver, and as such I am vehemently against adding any sort of
> > vendor specific code in here.
>
> I suggested doing it this way, as all alternatives seemed worse than this.
If we're using a registration function (could probably be swapped out
for or accompanied by a Device Tree property) anyway, then why conduct
the vendor platform checks?
--
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-04-24 8:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-17 2:14 [PATCH 0/2] Add new reg_update_bits() support Baolin Wang
2020-04-17 2:14 ` [PATCH 1/2] mfd: syscon: Support physical regmap bus Baolin Wang
2020-04-24 8:11 ` Lee Jones
2020-04-24 8:24 ` Arnd Bergmann
2020-04-24 8:32 ` Lee Jones [this message]
2020-04-24 8:42 ` Baolin Wang
2020-04-24 8:43 ` Baolin Wang
2020-04-17 2:14 ` [PATCH 2/2] soc: sprd: Add Spreadtrum special bits updating support Baolin Wang
2020-04-17 13:38 ` Arnd Bergmann
2020-04-17 14:10 ` Baolin Wang
2020-04-17 15:03 ` Arnd Bergmann
2020-04-18 1:52 ` 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=20200424083255.GQ3612@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.