Re: [PATCH] dt-bindings: Another round of adding missing 'additionalProperties'
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [PATCH] dt-bindings: Another round of adding missing 'additionalProperties'
- From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
- Date: Mon, 5 Oct 2020 10:34:36 +0100
- Cc: <devicetree@xxxxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>, "Thierry Reding" <thierry.reding@xxxxxxxxx>, Linus Walleij <linus.walleij@xxxxxxxxxx>, Stephen Boyd <sboyd@xxxxxxxxxx>, Shawn Guo <shawnguo@xxxxxxxxxx>, Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>, "Baolin Wang" <baolin.wang7@xxxxxxxxx>, Guenter Roeck <linux@xxxxxxxxxxxx>, Jonathan Cameron <jic23@xxxxxxxxxx>, Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>, Laurent Pinchart <laurent.pinchart+renesas@xxxxxxxxxxxxxxxx>, Lee Jones <lee.jones@xxxxxxxxxx>, Ulf Hansson <ulf.hansson@xxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Bjorn Helgaas <bhelgaas@xxxxxxxxxx>, "Vinod Koul" <vkoul@xxxxxxxxxx>, Liam Girdwood <lgirdwood@xxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>, <linux-clk@xxxxxxxxxxxxxxx>, <dri-devel@xxxxxxxxxxxxxxxxxxxxx>, <linux-spi@xxxxxxxxxxxxxxx>, <linux-gpio@xxxxxxxxxxxxxxx>, <linux-hwmon@xxxxxxxxxxxxxxx>, <linux-iio@xxxxxxxxxxxxxxx>, <openipmi-developer@xxxxxxxxxxxxxxxxxxxxx>, <linux-leds@xxxxxxxxxxxxxxx>, <linux-media@xxxxxxxxxxxxxxx>, <linux-rockchip@xxxxxxxxxxxxxxxxxxx>, <linux-stm32@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, <linux-mips@xxxxxxxxxxxxxxx>, <linux-mmc@xxxxxxxxxxxxxxx>, <netdev@xxxxxxxxxxxxxxx>, <linux-pci@xxxxxxxxxxxxxxx>, <linux-pm@xxxxxxxxxxxxxxx>, <linux-remoteproc@xxxxxxxxxxxxxxx>, <linux-serial@xxxxxxxxxxxxxxx>, <alsa-devel@xxxxxxxxxxxxxxxx>, <linux-usb@xxxxxxxxxxxxxxx>
- In-reply-to: <20201002234143.3570746-1-robh@kernel.org>
- Organization: Huawei Technologies Research and Development (UK) Ltd.
- References: <20201002234143.3570746-1-robh@kernel.org>
On Fri, 2 Oct 2020 18:41:43 -0500
Rob Herring <robh@xxxxxxxxxx> 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@xxxxxxxxx>
> Cc: Linus Walleij <linus.walleij@xxxxxxxxxx>
> Cc: Stephen Boyd <sboyd@xxxxxxxxxx>
> Cc: Shawn Guo <shawnguo@xxxxxxxxxx>
> Cc: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>
> Cc: Baolin Wang <baolin.wang7@xxxxxxxxx>
> Cc: Guenter Roeck <linux@xxxxxxxxxxxx>
> Cc: Jonathan Cameron <jic23@xxxxxxxxxx>
> Cc: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
> Cc: Laurent Pinchart <laurent.pinchart+renesas@xxxxxxxxxxxxxxxx>
> Cc: Lee Jones <lee.jones@xxxxxxxxxx>
> Cc: Ulf Hansson <ulf.hansson@xxxxxxxxxx>
> Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>
> Cc: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
> Cc: Vinod Koul <vkoul@xxxxxxxxxx>
> Cc: Liam Girdwood <lgirdwood@xxxxxxxxx>
> Cc: Mark Brown <broonie@xxxxxxxxxx>
> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> Cc: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>
> Cc: linux-clk@xxxxxxxxxxxxxxx
> Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx
> Cc: linux-spi@xxxxxxxxxxxxxxx
> Cc: linux-gpio@xxxxxxxxxxxxxxx
> Cc: linux-hwmon@xxxxxxxxxxxxxxx
> Cc: linux-iio@xxxxxxxxxxxxxxx
> Cc: openipmi-developer@xxxxxxxxxxxxxxxxxxxxx
> Cc: linux-leds@xxxxxxxxxxxxxxx
> Cc: linux-media@xxxxxxxxxxxxxxx
> Cc: linux-rockchip@xxxxxxxxxxxxxxxxxxx
> Cc: linux-stm32@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Cc: linux-mips@xxxxxxxxxxxxxxx
> Cc: linux-mmc@xxxxxxxxxxxxxxx
> Cc: netdev@xxxxxxxxxxxxxxx
> Cc: linux-pci@xxxxxxxxxxxxxxx
> Cc: linux-pm@xxxxxxxxxxxxxxx
> Cc: linux-remoteproc@xxxxxxxxxxxxxxx
> Cc: linux-serial@xxxxxxxxxxxxxxx
> Cc: alsa-devel@xxxxxxxxxxxxxxxx
> Cc: linux-usb@xxxxxxxxxxxxxxx
> Signed-off-by: Rob Herring <robh@xxxxxxxxxx>
> ---
Hi Rob,
Acked-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> # 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:
> - |
[Index of Archives]
[Linux Kernel]
[Linux ARM (vger)]
[Linux ARM MSM]
[Linux Omap]
[Linux Arm]
[Linux Tegra]
[Fedora ARM]
[Linux for Samsung SOC]
[eCos]
[Linux Fastboot]
[Gcc Help]
[Git]
[DCCP]
[IETF Announce]
[Security]
[Linux MIPS]
[Yosemite Campsites]
|