Commit f589c195 authored by Michael Ellerman's avatar Michael Ellerman Committed by Carlos Llamas
Browse files

UPSTREAM: of: Add of_machine_compatible_match()



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: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20231214103152.12269-1-mpe@ellerman.id.au



Bug: 339841691
(cherry picked from commit c029b22f)
Change-Id: Ida548d6fb8ea7637501f8fb69a289c22a0e02a86
Signed-off-by: default avatarZhipeng Wang <zhipeng.wang_1@nxp.com>
parent f9fbf393
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment