Re: [PATCH v1 08/14] dt-bindings: mtd: relax the nvmem compatible string
From: Michael Walle <hidden>
Date: 2022-08-31 07:48:24
Also in:
linux-arm-kernel, linux-devicetree, lkml
From: Michael Walle <hidden>
Date: 2022-08-31 07:48:24
Also in:
linux-arm-kernel, linux-devicetree, lkml
Am 2022-08-31 09:37, schrieb Krzysztof Kozlowski:
On 26/08/2022 00:44, Michael Walle wrote:quoted
The "user-otp" and "factory-otp" compatible string just depicts a generic NVMEM device. But an actual device tree node might as well contain a more specific compatible string. Make it possible to add more specific binding elsewere and just match part of the compatiblestypo: elsewherequoted
here. Signed-off-by: Michael Walle <redacted> --- Documentation/devicetree/bindings/mtd/mtd.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)diff --git a/Documentation/devicetree/bindings/mtd/mtd.yamlb/Documentation/devicetree/bindings/mtd/mtd.yaml index 376b679cfc70..0291e439b6a6 100644--- a/Documentation/devicetree/bindings/mtd/mtd.yaml +++ b/Documentation/devicetree/bindings/mtd/mtd.yaml@@ -33,9 +33,10 @@ patternProperties: properties: compatible: - enum: - - user-otp - - factory-otp + contains: + enum: + - user-otp + - factory-otpThis does not work in the "elsewhere" place. You need to use similar approach as we do for syscon or primecell.
I'm a bit confused. Looking at Documentation/devicetree/bindings/arm/primecell.yaml it is done in the same way as this binding. Whereas, the syscon use a "select:" on top of it. I'm pretty sure, I've tested it without the select and the validator picked up the constraints. Could you elaborate on what is wrong here? Select missing? -michael