Skip to content
Commit 14138c3b authored by Ulf Magnusson's avatar Ulf Magnusson Committed by Kumar Gala
Browse files

dts: edtlib: Improve how we get the compatible string from bindings

Use Galak's idea from
https://github.com/zephyrproject-rtos/zephyr/pull/18313

 to read the
'properties: compatible: constraint: "foo"' string from bindings in a
more robust way.

First, check if any of the compatible strings are in the file (needed as
an optimization). If any of them are, do a more careful check for the
'properties: compatible: constraint: ...' value matching a compatible,
to filter out false positives from comments and the like.

This commit a no-op in itself besides making things a bit more robust,
but it'll make later work easier (supporting multiple compatibles for a
binding, in a dt-schema-like way).

Co-authored-by: default avatarKumar Gala <kumar.gala@linaro.org>
Signed-off-by: default avatarUlf Magnusson <Ulf.Magnusson@nordicsemi.no>
parent c24a791d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment