From: Rob Herring <robh@kernel.org>
To: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: devicetree@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
Michael Ellerman <mpe@ellerman.id.au>,
Frank Rowand <frowand.list@gmail.com>,
Nicholas Piggin <npiggin@gmail.com>,
linux-kernel@vger.kernel.org, Rob Herring <robh+dt@kernel.org>
Subject: Re: [PATCH v1 1/4] of: Add of_machine_compatible_match()
Date: Thu, 7 Dec 2023 14:16:06 -0600 [thread overview]
Message-ID: <170198016525.3351044.1591427782941011681.robh@kernel.org> (raw)
In-Reply-To: <e6cf01d41502b15e688b6f5aa5c3b68c62b8ac64.1701878821.git.christophe.leroy@csgroup.eu>
On Wed, 06 Dec 2023 17:13:32 +0100, Christophe Leroy wrote:
> From: Michael Ellerman <mpe@ellerman.id.au>
>
> We have of_machine_is_compatible() to check if a machine is compatible
> with a single compatible string. However some code is able to support
> multiple compatible boards, and so wants to check for one of many
> compatible strings.
>
> So add of_machine_compatible_match() which takes a NULL terminated
> array of compatible strings to check against the root node's
> compatible property.
>
> Compared to an open coded match this is slightly more self
> documenting, and also avoids the caller needing to juggle the root
> node either directly or via of_find_node_by_path().
>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
> ---
> drivers/of/base.c | 21 +++++++++++++++++++++
> include/linux/of.h | 6 ++++++
> 2 files changed, 27 insertions(+)
>
Reviewed-by: Rob Herring <robh@kernel.org>
prev parent reply other threads:[~2023-12-07 20:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-06 16:13 Christophe Leroy
2023-12-06 16:13 ` [PATCH v1 2/4] of: Reimplement of_machine_is_compatible() using of_machine_compatible_match() Christophe Leroy
2023-12-07 20:26 ` Rob Herring
2023-12-06 16:13 ` [PATCH v1 3/4] powerpc/machdep: Define 'compatibles' property in ppc_md and use it Christophe Leroy
2023-12-07 20:15 ` Rob Herring
2023-12-06 16:13 ` [PATCH v1 4/4] powerpc: Stop using of_root Christophe Leroy
2023-12-07 20:15 ` Rob Herring
2023-12-07 20:16 ` Rob Herring [this message]
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=170198016525.3351044.1591427782941011681.robh@kernel.org \
--to=robh@kernel.org \
--cc=christophe.leroy@csgroup.eu \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=robh+dt@kernel.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
all inboxes | Powered by JetHome®