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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201005093436.00004913@Huawei.com>
Date:   Mon, 5 Oct 2020 10:34:36 +0100
From:   Jonathan Cameron <Jonathan.Cameron@...wei.com>
To:     Rob Herring <robh@...nel.org>
CC:     <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        "Thierry Reding" <thierry.reding@...il.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Stephen Boyd <sboyd@...nel.org>,
        Shawn Guo <shawnguo@...nel.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        "Baolin Wang" <baolin.wang7@...il.com>,
        Guenter Roeck <linux@...ck-us.net>,
        Jonathan Cameron <jic23@...nel.org>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Laurent Pinchart <laurent.pinchart+renesas@...asonboard.com>,
        Lee Jones <lee.jones@...aro.org>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        "David S. Miller" <davem@...emloft.net>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        "Vinod Koul" <vkoul@...nel.org>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        <linux-clk@...r.kernel.org>, <dri-devel@...ts.freedesktop.org>,
        <linux-spi@...r.kernel.org>, <linux-gpio@...r.kernel.org>,
        <linux-hwmon@...r.kernel.org>, <linux-iio@...r.kernel.org>,
        <openipmi-developer@...ts.sourceforge.net>,
        <linux-leds@...r.kernel.org>, <linux-media@...r.kernel.org>,
        <linux-rockchip@...ts.infradead.org>,
        <linux-stm32@...md-mailman.stormreply.com>,
        <linux-mips@...r.kernel.org>, <linux-mmc@...r.kernel.org>,
        <netdev@...r.kernel.org>, <linux-pci@...r.kernel.org>,
        <linux-pm@...r.kernel.org>, <linux-remoteproc@...r.kernel.org>,
        <linux-serial@...r.kernel.org>, <alsa-devel@...a-project.org>,
        <linux-usb@...r.kernel.org>
Subject: Re: [PATCH] dt-bindings: Another round of adding missing
 'additionalProperties'

On Fri, 2 Oct 2020 18:41:43 -0500
Rob Herring <robh@...nel.org> wrote:

> Another round of wack-a-mole. The json-schema default is additional
> unknown properties are allowed, but for DT all properties should be
> defined.
> 
> Cc: Thierry Reding <thierry.reding@...il.com>
> Cc: Linus Walleij <linus.walleij@...aro.org>
> Cc: Stephen Boyd <sboyd@...nel.org>
> Cc: Shawn Guo <shawnguo@...nel.org>
> Cc: Bjorn Andersson <bjorn.andersson@...aro.org>
> Cc: Baolin Wang <baolin.wang7@...il.com>
> Cc: Guenter Roeck <linux@...ck-us.net>
> Cc: Jonathan Cameron <jic23@...nel.org>
> Cc: Mauro Carvalho Chehab <mchehab@...nel.org>
> Cc: Laurent Pinchart <laurent.pinchart+renesas@...asonboard.com>
> Cc: Lee Jones <lee.jones@...aro.org>
> Cc: Ulf Hansson <ulf.hansson@...aro.org>
> Cc: "David S. Miller" <davem@...emloft.net>
> Cc: Bjorn Helgaas <bhelgaas@...gle.com>
> Cc: Vinod Koul <vkoul@...nel.org>
> Cc: Liam Girdwood <lgirdwood@...il.com>
> Cc: Mark Brown <broonie@...nel.org>
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Cc: Daniel Lezcano <daniel.lezcano@...aro.org>
> Cc: linux-clk@...r.kernel.org
> Cc: dri-devel@...ts.freedesktop.org
> Cc: linux-spi@...r.kernel.org
> Cc: linux-gpio@...r.kernel.org
> Cc: linux-hwmon@...r.kernel.org
> Cc: linux-iio@...r.kernel.org
> Cc: openipmi-developer@...ts.sourceforge.net
> Cc: linux-leds@...r.kernel.org
> Cc: linux-media@...r.kernel.org
> Cc: linux-rockchip@...ts.infradead.org
> Cc: linux-stm32@...md-mailman.stormreply.com
> Cc: linux-mips@...r.kernel.org
> Cc: linux-mmc@...r.kernel.org
> Cc: netdev@...r.kernel.org
> Cc: linux-pci@...r.kernel.org
> Cc: linux-pm@...r.kernel.org
> Cc: linux-remoteproc@...r.kernel.org
> Cc: linux-serial@...r.kernel.org
> Cc: alsa-devel@...a-project.org
> Cc: linux-usb@...r.kernel.org
> Signed-off-by: Rob Herring <robh@...nel.org>
> ---

Hi Rob,

Acked-by: Jonathan Cameron <Jonathan.Cameron@...wei.com> # for iio


However, one of these made me wonder if the binding was simply wrong...
(definitely highlights why we should have additionalProperties: false
where ever possible).

...


> diff --git a/Documentation/devicetree/bindings/iio/imu/invensense,icm42600.yaml b/Documentation/devicetree/bindings/iio/imu/invensense,icm42600.yaml
> index abd8d25e1136..4c1c083d0e92 100644
> --- a/Documentation/devicetree/bindings/iio/imu/invensense,icm42600.yaml
> +++ b/Documentation/devicetree/bindings/iio/imu/invensense,icm42600.yaml
> @@ -47,11 +47,17 @@ properties:
>    vddio-supply:
>      description: Regulator that provides power to the bus
>  
> +  spi-max-frequency: true
> +  spi-cpha: true
> +  spi-cpol: true

It isn't completely unheard of for a device to operate in multiple SPI modes, but
it does seem to be fairly unusual.  I took a look at the datasheet and at least
from the provided timing diagrams, these are both required in SPI mode.

http://invensense.tdk.com/wp-content/uploads/2020/09/DS-000292-ICM-42605-v1.5.pdf

That doesn't make the binding wrong as such, but we could be tighter in checking this!

I'll add this to my list to take a closer look at sometime soonish.

Thanks.

Jonathan

> +
>  required:
>    - compatible
>    - reg
>    - interrupts
>  
> +additionalProperties: false
> +
>  examples:
>    - |

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ