lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <fca65d4a-7e2a-47c8-809d-eac758433eb4@kernel.org>
Date: Mon, 15 Jul 2024 09:15:26 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Stanislav Jakubek <stano.jakubek@...il.com>
Cc: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
 Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
 Conor Dooley <conor+dt@...nel.org>, Orson Zhai <orsonzhai@...il.com>,
 Baolin Wang <baolin.wang@...ux.alibaba.com>,
 Baolin Wang <baolin.wang7@...il.com>, Chunyan Zhang <zhang.lyra@...il.com>,
 devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dt-bindings: nvmem: sprd-efuse: convert to YAML

On 14/07/2024 13:10, Stanislav Jakubek wrote:
> On Sat, Jul 13, 2024 at 08:31:31PM +0200, Krzysztof Kozlowski wrote:
>> On 13/07/2024 14:12, Stanislav Jakubek wrote:
> 
> [snip]
> 
>>> +allOf:
>>> +  - $ref: nvmem.yaml#
>>> +  - $ref: nvmem-deprecated-cells.yaml#
>>> +  - if:
>>> +      properties:
>>> +        compatible:
>>> +          contains:
>>> +            const: sprd,ums312-efuse
>>> +    then:
>>> +      required:
>>> +        - clocks
>>> +        - clock-names
>>> +    else:
>>> +      properties:
>>> +        clocks: false
>>> +        clock-names: false
>>
>> Half of the binding is this "if:", so I would say they are not that
>> similar. I think it would be easier to read them if these were split
>> into two bindings.
>>
>> Best regards,
>> Krzysztof
>>
> 
> Hi Krzysztof,
> 
> pretty much this exact if-then-else is described in the "Writing Devicetree
> Bindings in json-schema" documentation as a "typical case" for its usage, so
> I went with that. I think that it's simple enough that it only minimally
> hampers readability.

Example schema has a lot of stuff shown, because it is example...

> 
> I admit that there might be some confusion, since I forgot to include an
> example for the sprd,ums312-efuse (i.e. with clocks and clock-names).
> Could I just add this example in V2 and keep it as-is otherwise?

Usually one example per binding is enough, if devices differ by one
property.


Best regards,
Krzysztof


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ