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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 18 Nov 2021 16:23:20 -0600
From:   Rob Herring <robh@...nel.org>
To:     Pratyush Yadav <p.yadav@...com>
Cc:     Mark Brown <broonie@...nel.org>, Nishanth Menon <nm@...com>,
        Michael Walle <michael@...le.cc>,
        Miquel Raynal <miquel.raynal@...tlin.com>,
        Richard Weinberger <richard@....at>,
        Tudor Ambarus <tudor.ambarus@...rochip.com>,
        Vignesh Raghavendra <vigneshr@...com>,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-mtd@...ts.infradead.org, linux-spi@...r.kernel.org
Subject: Re: [PATCH v3 1/3] spi: dt-bindings: add schema listing
 peripheral-specific properties

On Tue, Nov 09, 2021 at 11:49:09PM +0530, Pratyush Yadav wrote:
> Many SPI controllers need to add properties to peripheral devices. This
> could be the delay in clock or data lines, etc. These properties are
> controller specific but need to be defined in the peripheral node
> because they are per-peripheral and there can be multiple peripherals
> attached to a controller.
> 
> If these properties are not added to the peripheral binding, then the
> dtbs check emits a warning. But these properties do not make much sense
> in the peripheral binding because they are controller-specific and they
> will just pollute every peripheral binding. So this binding is added to
> collect all such properties from all such controllers. Peripheral
> bindings should simply refer to this binding and they should be rid of
> the warnings.
> 
> There are some limitations with this approach. Firstly, there is no way
> to specify required properties. The schema contains properties for all
> controllers and there is no way to know which controller is being used.
> Secondly, there is no way to restrict additional properties. Since this
> schema will be used with an allOf operator, additionalProperties needs
> to be true. In addition, the peripheral schema will have to set
> unevaluatedProperties: false.
> 
> Despite these limitations, this appears to be the best solution to this
> problem that doesn't involve modifying existing tools or schema specs.
> 
> Signed-off-by: Pratyush Yadav <p.yadav@...com>
> 
> ---
> 
> Changes in v3:
> - s/slave/peripheral/g
> - Drop the | on description.
> - Drop the compatible property.
> 
> Changes in v2:
> - Move other subnode properties listed in spi-controller.yaml to
>   spi-slave-props.yaml
> - Move the Cadence controller-specific properties out of
>   spi-slave-props.yaml. They will be added in a separate file.
> - Add a reference to spi-slave-props.yaml in spi-controller.yaml.
> - Update description.
> 
>  .../bindings/spi/spi-controller.yaml          | 69 +--------------
>  .../bindings/spi/spi-peripheral-props.yaml    | 87 +++++++++++++++++++
>  2 files changed, 89 insertions(+), 67 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml

Reviewed-by: Rob Herring <robh@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ