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]
Date: Mon, 27 May 2024 08:26:06 +0000
From: Witold Sadowski <wsadowski@...vell.com>
To: Conor Dooley <conor@...nel.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-spi@...r.kernel.org" <linux-spi@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "broonie@...nel.org" <broonie@...nel.org>,
        "robh@...nel.org"
	<robh@...nel.org>,
        "krzysztof.kozlowski+dt@...aro.org"
	<krzysztof.kozlowski+dt@...aro.org>,
        "conor+dt@...nel.org"
	<conor+dt@...nel.org>,
        "pthombar@...ence.com" <pthombar@...ence.com>
Subject: RE: [EXTERNAL] Re: [PATCH v4 2/5] dt-bindings: spi: cadence: Add MRVL
 overlay bindings documentation for Cadence XSPI

> ----------------------------------------------------------------------
> Hey Witold,
> 
> On Wed, May 08, 2024 at 06:05:20PM -0700, Witold Sadowski wrote:
> 
> >  allOf:
> >    - $ref: spi-controller.yaml#
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            const: marvell,cn10-xspi-nor
> > +    then:
> > +      properties:
> > +        reg-names:
> > +          items:
> > +            - const: io
> > +            - const: sdma
> > +            - const: aux
> > +            - const: xferbase
> > +        reg:
> > +          items:
> > +            - description: address and length of the controller
> register set
> > +            - description: address and length of the Slave DMA data
> port
> > +            - description: address and length of the auxiliary
> registers
> > +            - description: address and length of the xfer registers
> > +    else:
> > +      properties:
> > +        reg-names:
> > +          items:
> > +            - const: io
> > +            - const: sdma
> > +            - const: aux
> > +        reg:
> > +          items:
> > +            - description: address and length of the controller
> register set
> > +            - description: address and length of the Slave DMA data
> port
> > +            - description: address and length of the auxiliary
> > + registers
> 
> The usual approach here is to define the loosest possible constraints at
> the top level, so unconditionally define the xfer register region, and
> then constrain things based on compatible. In this case, you can set
> minItems to 3 unconditionally and then do (in psuedocode):
> if:
>   marvell
> then:
>   reg:
>     minitems: 4
> else
>   reg:
>     maxItems: 3
> 
> Additionally, when the allOf: is more then just references to other
> documents, it should be moved below the required list.

Thanks for hints.
Yaml file will be reworked to match guideliness

> 
> Thanks,
> Conor.

Regards
Witek

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ