From: Linus Walleij <linus.walleij@linaro.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Rob Herring <robh@kernel.org>, Sean Wang <sean.wang@kernel.org>,
Tony Lindgren <tony@atomide.com>,
Haojian Zhuang <haojian.zhuang@linaro.org>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Chen-Yu Tsai <wens@csie.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Samuel Holland <samuel@sholland.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-renesas-soc@vger.kernel.org, linux-sunxi@lists.linux.dev
Subject: Re: [PATCH] pinctrl: Use of_property_present() for testing DT property presence
Date: Sun, 19 Mar 2023 21:55:29 +0100 [thread overview]
Message-ID: <CACRpkdaw7TodD0hr3vD8cGB80k0qtEiaC1ne-ivCj6YEefi44w@mail.gmail.com> (raw)
In-Reply-To: <CAMuHMdX1=+WwWjfiWDYOjSzTjcYBEY+QR=XKuU+o5_SCyU7rag@mail.gmail.com>
On Mon, Mar 13, 2023 at 12:00 PM Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> On Mon, Mar 13, 2023 at 10:00 AM Geert Uytterhoeven
> <geert@linux-m68k.org> wrote:
> > On Fri, Mar 10, 2023 at 3:56 PM Rob Herring <robh@kernel.org> wrote:
> > > It is preferred to use typed property access functions (i.e.
> > > of_property_read_<type> functions) rather than low-level
> > > of_get_property/of_find_property functions for reading properties. As
> > > part of this, convert of_get_property/of_find_property calls to the
> > > recently added of_property_present() helper when we just want to test
> > > for presence of a property and nothing more.
> > >
> > > Signed-off-by: Rob Herring <robh@kernel.org>
> >
> > Thanks for your patch!
> >
> > > --- a/drivers/pinctrl/renesas/pinctrl.c
> > > +++ b/drivers/pinctrl/renesas/pinctrl.c
> > > @@ -125,8 +125,8 @@ static int sh_pfc_dt_subnode_to_map(struct pinctrl_dev *pctldev,
> > > * inside a subnode nor across subnodes.
> > > */
> > > if (!pmx->func_prop_name) {
> > > - if (of_find_property(np, "groups", NULL) ||
> > > - of_find_property(np, "pins", NULL)) {
> > > + if (of_property_present(np, "groups")||
> > > + of_property_present(np, "pins")) {
> > > pmx->func_prop_name = "function";
> > > pmx->groups_prop_name = "groups";
> > > pmx->pins_prop_name = "pins";
> >
> > Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> >
> > This check is used to auto-detect if the standard property names
> > should be used, or the "renesas,"-prefixed ones.
> > As the last users of the latter were removed from DTS in v4.10,
> > perhaps I should just remove these checks instead?
>
> Sent a patch just doing that, so you can drop this chunk.
> https://lore.kernel.org/linux-renesas-soc/ff9c14781110bbf19b56b45dd1f01e6da90319ad.1678704441.git.geert+renesas@glider.be
So I need a new version of this patch before I can apply it
I guess, or there will be conflict with Reseas stuff?
Yours,
Linus Walleij
next prev parent reply other threads:[~2023-03-19 20:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-10 14:47 [PATCH] pinctrl: Use of_property_present() for testing DT property presence Rob Herring
2023-03-13 8:44 ` AngeloGioacchino Del Regno
2023-03-13 9:00 ` Geert Uytterhoeven
2023-03-13 11:00 ` Geert Uytterhoeven
2023-03-19 20:55 ` Linus Walleij [this message]
2023-03-20 8:01 ` Geert Uytterhoeven
2023-03-20 18:17 ` Rob Herring
2023-03-23 8:29 ` Linus Walleij
2023-03-13 10:17 ` Andre Przywara
2023-03-14 20:01 ` Jernej Škrabec
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=CACRpkdaw7TodD0hr3vD8cGB80k0qtEiaC1ne-ivCj6YEefi44w@mail.gmail.com \
--to=linus.walleij@linaro.org \
--cc=alexandre.torgue@foss.st.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=devicetree@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=geert@linux-m68k.org \
--cc=haojian.zhuang@linaro.org \
--cc=jernej.skrabec@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=linux-sunxi@lists.linux.dev \
--cc=matthias.bgg@gmail.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=robh@kernel.org \
--cc=samuel@sholland.org \
--cc=sean.wang@kernel.org \
--cc=tony@atomide.com \
--cc=wens@csie.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).