[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220829063557.3ntgt6uqblgew3r3@soft-dev3-1.localhost>
Date: Mon, 29 Aug 2022 08:35:57 +0200
From: Horatiu Vultur <horatiu.vultur@...rochip.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
CC: <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<srinivas.kandagatla@...aro.org>, <robh+dt@...nel.org>,
<krzysztof.kozlowski+dt@...aro.org>, <UNGLinuxDriver@...rochip.com>
Subject: Re: [PATCH v2 1/2] dt-bindings: lan9662-otpc: document Lan9662 OTPC
The 08/26/2022 20:37, Krzysztof Kozlowski wrote:
>
> On 26/08/2022 10:31, Horatiu Vultur wrote:
> > The 08/26/2022 09:42, Krzysztof Kozlowski wrote:
> >
> > Hi Krzysztof,
> >
> >>> +properties:
> >>> + compatible:
> >>> + items:
> >>> + - const: microchip,lan9662-otpc
> >>> + - const: microchip,lan9668-otpc
> >>
> >> Does not look like you tested the bindings. Please run `make
> >> dt_binding_check` (see
> >> Documentation/devicetree/bindings/writing-schema.rst for instructions).
> >>
> >> This won't work...
> >
> > You are right. That was a silly mistake on my side.
> >
> > It should be:
> > ---
> > properties:
> > compatible:
> > enum:
> > - microchip,lan9662-otpc
> > - microchip,lan9668-otpc
> > ---
> > Because what I want to achive is to be able to use any of
> > string(microchip,lan9662-otpc or microchip,lan9668-otpc) as compatible
> > string.
> >
> > Or this is not the correct change?
> > At least with this change dt_binding_check is happy.
>
> This would be correct from syntax point of view, however maybe not the
> best choice from functional point of view. How you wrote the driver and
> bindings, these devices are compatible, so why this is not expressed as
> compatible devices?
OK, so then it should be something like this?
---
properties:
compatible:
items:
- const: microchip,lan9662-otpc
- const: microchip,lan9668-otpc
---
I have tried to look at the following yaml files[1],[2] to see how they
have done it.
[1] https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
[2] https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml
>
> Best regards,
> Krzysztof
--
/Horatiu
Powered by blists - more mailing lists