[PATCH] dt-bindings: Another round of adding missing 'additionalProperties'
Jonathan Cameron
Jonathan.Cameron at Huawei.com
Mon Oct 5 11:34:36 CEST 2020
On Fri, 2 Oct 2020 18:41:43 -0500
Rob Herring <robh at kernel.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 at gmail.com>
> Cc: Linus Walleij <linus.walleij at linaro.org>
> Cc: Stephen Boyd <sboyd at kernel.org>
> Cc: Shawn Guo <shawnguo at kernel.org>
> Cc: Bjorn Andersson <bjorn.andersson at linaro.org>
> Cc: Baolin Wang <baolin.wang7 at gmail.com>
> Cc: Guenter Roeck <linux at roeck-us.net>
> Cc: Jonathan Cameron <jic23 at kernel.org>
> Cc: Mauro Carvalho Chehab <mchehab at kernel.org>
> Cc: Laurent Pinchart <laurent.pinchart+renesas at ideasonboard.com>
> Cc: Lee Jones <lee.jones at linaro.org>
> Cc: Ulf Hansson <ulf.hansson at linaro.org>
> Cc: "David S. Miller" <davem at davemloft.net>
> Cc: Bjorn Helgaas <bhelgaas at google.com>
> Cc: Vinod Koul <vkoul at kernel.org>
> Cc: Liam Girdwood <lgirdwood at gmail.com>
> Cc: Mark Brown <broonie at kernel.org>
> Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
> Cc: Daniel Lezcano <daniel.lezcano at linaro.org>
> Cc: linux-clk at vger.kernel.org
> Cc: dri-devel at lists.freedesktop.org
> Cc: linux-spi at vger.kernel.org
> Cc: linux-gpio at vger.kernel.org
> Cc: linux-hwmon at vger.kernel.org
> Cc: linux-iio at vger.kernel.org
> Cc: openipmi-developer at lists.sourceforge.net
> Cc: linux-leds at vger.kernel.org
> Cc: linux-media at vger.kernel.org
> Cc: linux-rockchip at lists.infradead.org
> Cc: linux-stm32 at st-md-mailman.stormreply.com
> Cc: linux-mips at vger.kernel.org
> Cc: linux-mmc at vger.kernel.org
> Cc: netdev at vger.kernel.org
> Cc: linux-pci at vger.kernel.org
> Cc: linux-pm at vger.kernel.org
> Cc: linux-remoteproc at vger.kernel.org
> Cc: linux-serial at vger.kernel.org
> Cc: alsa-devel at alsa-project.org
> Cc: linux-usb at vger.kernel.org
> Signed-off-by: Rob Herring <robh at kernel.org>
> ---
Hi Rob,
Acked-by: Jonathan Cameron <Jonathan.Cameron at huawei.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:
> - |
More information about the Alsa-devel
mailing list