linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Horatiu Vultur <horatiu.vultur@microchip.com>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	srinivas.kandagatla@linaro.org, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, UNGLinuxDriver@microchip.com
Subject: Re: [PATCH v2 1/2] dt-bindings: lan9662-otpc: document Lan9662 OTPC
Date: Tue, 30 Aug 2022 13:10:17 +0300	[thread overview]
Message-ID: <fa987e2a-cd48-b08b-d191-419624699dc9@linaro.org> (raw)
In-Reply-To: <20220829063557.3ntgt6uqblgew3r3@soft-dev3-1.localhost>

On 29/08/2022 09:35, Horatiu Vultur wrote:
> 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 would expect:

oneOf:
  - items:
       - const: microchip,lan9668-otpc
       - const: microchip,lan9662-otpc
  - enum:
       - microchip,lan9662-otpc

(but you need to fix indentation)

Best regards,
Krzysztof

  reply	other threads:[~2022-08-30 10:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-25 20:40 [PATCH v2 0/2] nvmem: lan9662-otpc: add support Horatiu Vultur
2022-08-25 20:40 ` [PATCH v2 1/2] dt-bindings: lan9662-otpc: document Lan9662 OTPC Horatiu Vultur
2022-08-26  6:42   ` Krzysztof Kozlowski
2022-08-26  7:31     ` Horatiu Vultur
2022-08-26 17:37       ` Krzysztof Kozlowski
2022-08-29  6:35         ` Horatiu Vultur
2022-08-30 10:10           ` Krzysztof Kozlowski [this message]
2022-08-26 16:05   ` Rob Herring
2022-08-25 20:40 ` [PATCH v2 2/2] nvmem: lan9662-otp: add support Horatiu Vultur
2022-08-26  6:43   ` Krzysztof Kozlowski
2022-08-30 12:08   ` Srinivas Kandagatla
2022-08-30 20:07     ` Horatiu Vultur

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=fa987e2a-cd48-b08b-d191-419624699dc9@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=devicetree@vger.kernel.org \
    --cc=horatiu.vultur@microchip.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=srinivas.kandagatla@linaro.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;
as well as URLs for NNTP newsgroup(s).