mbox series

[0/4] dt-bindings: additionalProperties clean-up

Message ID 20200325220542.19189-1-robh@kernel.org
Headers show
Series dt-bindings: additionalProperties clean-up | expand

Message

Rob Herring March 25, 2020, 10:05 p.m. UTC
Setting 'additionalProperties: false' is frequently omitted, but is
important in order to check that there aren't extra undocumented
properties in a binding.

This series is a bunch of fixes in patches 1-3 found by setting
'additionalProperties: false' and then patch 4 sets additionalProperties
on a bunch of schema.

Rob


Rob Herring (4):
  dt-bindings: iio/accel: Drop duplicate adi,adxl345/6 from
    trivial-devices.yaml
  dt-bindings: sram: qcom: Clean-up 'ranges' and child node names
  dt-bindings: Clean-up schema errors due to missing
    'addtionalProperties: false'
  dt-bindings: Add missing 'additionalProperties: false'

 .../arm/altera/socfpga-clk-manager.yaml       |  2 ++
 .../amlogic/amlogic,meson-gx-ao-secure.yaml   |  2 ++
 .../bindings/arm/msm/qcom,llcc.yaml           |  2 ++
 .../devicetree/bindings/arm/renesas,prr.yaml  |  2 ++
 .../bindings/arm/samsung/exynos-chipid.yaml   |  2 ++
 .../devicetree/bindings/arm/samsung/pmu.yaml  |  2 ++
 .../arm/samsung/samsung-secure-firmware.yaml  |  2 ++
 .../bindings/arm/stm32/st,stm32-syscon.yaml   |  2 ++
 .../devicetree/bindings/clock/fsl,plldig.yaml |  5 ++++
 .../bindings/clock/imx8mn-clock.yaml          |  2 ++
 .../bindings/clock/imx8mp-clock.yaml          |  2 ++
 .../bindings/clock/milbeaut-clock.yaml        |  2 ++
 .../bindings/clock/qcom,gcc-apq8064.yaml      |  2 ++
 .../bindings/clock/qcom,gcc-ipq8074.yaml      |  2 ++
 .../bindings/clock/qcom,gcc-msm8996.yaml      |  2 ++
 .../bindings/clock/qcom,gcc-msm8998.yaml      |  2 ++
 .../bindings/clock/qcom,gcc-qcs404.yaml       |  2 ++
 .../bindings/clock/qcom,gcc-sc7180.yaml       |  2 ++
 .../bindings/clock/qcom,gcc-sm8150.yaml       |  2 ++
 .../devicetree/bindings/clock/qcom,gcc.yaml   |  2 ++
 .../devicetree/bindings/clock/qcom,mmcc.yaml  |  2 ++
 .../bindings/clock/qcom,msm8998-gpucc.yaml    |  2 ++
 .../bindings/clock/qcom,rpmhcc.yaml           |  2 ++
 .../bindings/clock/qcom,sc7180-dispcc.yaml    |  2 ++
 .../bindings/clock/qcom,sc7180-gpucc.yaml     |  2 ++
 .../bindings/clock/qcom,sc7180-videocc.yaml   |  2 ++
 .../bindings/clock/qcom,sdm845-dispcc.yaml    |  2 ++
 .../bindings/clock/qcom,sdm845-gpucc.yaml     |  2 ++
 .../bindings/clock/qcom,sdm845-videocc.yaml   |  2 ++
 .../bindings/display/amlogic,meson-vpu.yaml   |  2 ++
 .../bindings/dma/sifive,fu540-c000-pdma.yaml  |  2 ++
 .../devicetree/bindings/dsp/fsl,dsp.yaml      |  2 ++
 .../devicetree/bindings/eeprom/at24.yaml      |  2 ++
 ...ntel,ixp4xx-network-processing-engine.yaml |  3 +++
 .../bindings/gpio/brcm,xgs-iproc-gpio.yaml    |  2 ++
 .../gpio/socionext,uniphier-gpio.yaml         |  4 +++
 .../bindings/gpio/xylon,logicvc-gpio.yaml     |  2 ++
 .../bindings/gpu/arm,mali-bifrost.yaml        |  8 +++---
 .../bindings/gpu/arm,mali-midgard.yaml        |  5 ++++
 .../bindings/gpu/arm,mali-utgard.yaml         |  2 ++
 .../bindings/gpu/samsung-rotator.yaml         |  2 ++
 .../bindings/hwmon/adi,adm1177.yaml           |  2 ++
 .../bindings/hwmon/adi,ltc2947.yaml           |  2 ++
 .../bindings/hwmon/pmbus/ti,ucd90320.yaml     |  2 ++
 .../devicetree/bindings/hwmon/ti,tmp513.yaml  |  2 ++
 .../bindings/iio/accel/adi,adxl345.yaml       | 10 +++++---
 .../bindings/iio/accel/bosch,bma400.yaml      |  2 ++
 .../bindings/iio/adc/adi,ad7192.yaml          |  1 -
 .../bindings/iio/adc/adi,ad7780.yaml          |  2 ++
 .../bindings/iio/adc/avia-hx711.yaml          |  2 ++
 .../bindings/iio/adc/lltc,ltc2496.yaml        |  2 ++
 .../bindings/iio/adc/microchip,mcp3911.yaml   |  2 ++
 .../bindings/iio/adc/st,stm32-dfsdm-adc.yaml  |  2 ++
 .../iio/chemical/plantower,pms7003.yaml       |  2 ++
 .../iio/chemical/sensirion,sps30.yaml         |  2 ++
 .../bindings/iio/dac/lltc,ltc1660.yaml        |  2 ++
 .../bindings/iio/light/adux1020.yaml          |  2 ++
 .../devicetree/bindings/iio/light/bh1750.yaml |  2 ++
 .../bindings/iio/light/isl29018.yaml          |  2 ++
 .../bindings/iio/light/noa1305.yaml           |  2 ++
 .../bindings/iio/light/stk33xx.yaml           |  2 ++
 .../bindings/iio/light/tsl2583.yaml           |  2 ++
 .../bindings/iio/light/tsl2772.yaml           |  2 ++
 .../bindings/iio/light/veml6030.yaml          |  2 ++
 .../bindings/iio/pressure/asc,dlhl60d.yaml    |  2 ++
 .../bindings/iio/pressure/bmp085.yaml         |  5 ++++
 .../iio/proximity/devantech-srf04.yaml        |  2 ++
 .../bindings/iio/proximity/parallax-ping.yaml |  2 ++
 .../bindings/iio/temperature/adi,ltc2983.yaml |  2 ++
 .../bindings/input/gpio-vibrator.yaml         |  2 ++
 .../bindings/input/max77650-onkey.yaml        |  3 +++
 .../intel,ixp4xx-interrupt.yaml               |  2 ++
 .../bindings/iommu/samsung,sysmmu.yaml        |  2 ++
 .../bindings/leds/leds-max77650.yaml          |  3 +++
 .../bindings/leds/rohm,bd71828-leds.yaml      |  3 +++
 .../mailbox/amlogic,meson-gxbb-mhu.yaml       |  2 ++
 .../bindings/media/amlogic,gx-vdec.yaml       |  2 ++
 .../media/amlogic,meson-gx-ao-cec.yaml        | 11 +++++---
 .../bindings/media/renesas,ceu.yaml           |  2 ++
 .../devicetree/bindings/mfd/max77650.yaml     |  2 ++
 .../bindings/mfd/rohm,bd71828-pmic.yaml       |  5 ++++
 .../misc/intel,ixp4xx-ahb-queue-manager.yaml  |  2 ++
 .../bindings/net/ti,cpsw-switch.yaml          | 25 +++++++++++++------
 .../phy/allwinner,sun50i-h6-usb3-phy.yaml     |  2 ++
 .../phy/amlogic,meson-g12a-usb3-pcie-phy.yaml |  2 ++
 .../bindings/phy/intel,lgm-emmc-phy.yaml      |  2 ++
 .../bindings/phy/marvell,mmp3-hsic-phy.yaml   |  2 ++
 .../bindings/phy/ti,phy-j721e-wiz.yaml        |  2 ++
 .../pinctrl/aspeed,ast2400-pinctrl.yaml       |  2 ++
 .../pinctrl/aspeed,ast2500-pinctrl.yaml       |  2 ++
 .../pinctrl/aspeed,ast2600-pinctrl.yaml       |  2 ++
 .../bindings/pinctrl/st,stm32-pinctrl.yaml    |  2 ++
 .../bindings/power/amlogic,meson-ee-pwrc.yaml |  2 ++
 .../bindings/power/reset/syscon-poweroff.yaml |  2 ++
 .../bindings/power/reset/syscon-reboot.yaml   |  2 ++
 .../power/supply/max77650-charger.yaml        |  3 +++
 .../devicetree/bindings/ptp/ptp-idtcm.yaml    |  2 ++
 .../regulator/max77650-regulator.yaml         |  5 +++-
 .../bindings/reset/amlogic,meson-reset.yaml   |  2 ++
 .../reset/brcm,bcm7216-pcie-sata-rescal.yaml  |  2 ++
 .../bindings/rng/amlogic,meson-rng.yaml       |  2 ++
 .../devicetree/bindings/rng/brcm,bcm2835.yaml |  2 ++
 .../bindings/rtc/renesas,sh-rtc.yaml          |  2 ++
 .../devicetree/bindings/rtc/st,stm32-rtc.yaml |  2 ++
 .../bindings/serial/amlogic,meson-uart.yaml   |  2 ++
 .../bindings/soc/amlogic/amlogic,canvas.yaml  |  2 ++
 .../bindings/sound/adi,adau7118.yaml          |  2 ++
 .../bindings/sound/qcom,wcd934x.yaml          |  2 ++
 .../bindings/sound/renesas,fsi.yaml           |  2 ++
 .../bindings/sound/samsung,odroid.yaml        |  2 ++
 .../bindings/sound/samsung-i2s.yaml           |  2 ++
 .../devicetree/bindings/sram/qcom,ocmem.yaml  | 14 ++++++-----
 .../bindings/thermal/amlogic,thermal.yaml     |  4 +++
 .../bindings/timer/arm,arch_timer.yaml        |  2 ++
 .../bindings/timer/arm,arch_timer_mmio.yaml   |  4 +++
 .../bindings/timer/arm,global_timer.yaml      |  2 ++
 .../bindings/timer/intel,ixp4xx-timer.yaml    |  2 ++
 .../timer/samsung,exynos4210-mct.yaml         |  2 ++
 .../devicetree/bindings/trivial-devices.yaml  |  6 ++---
 119 files changed, 296 insertions(+), 29 deletions(-)

--
2.20.1

Comments

Alexandru Ardelean March 26, 2020, 7:58 a.m. UTC | #1
On Wed, 2020-03-25 at 16:05 -0600, Rob Herring wrote:
> Numerous schemas are missing 'additionalProperties: false' statements which

> ensures a binding doesn't have any extra undocumented properties or child

> nodes. Fixing this reveals various missing properties, so let's fix all

> those occurrences.

> 


For 'bindings/iio/adc/adi,ad7192.yaml'

Acked-by: Alexandru Ardelean <alexandru.ardelean@analog.com>


> Cc: Stephen Boyd <sboyd@kernel.org>

> Cc: Linus Walleij <linus.walleij@linaro.org>

> Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>

> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>

> Cc: Jonathan Cameron <jic23@kernel.org>

> Cc: Hartmut Knaack <knaack.h@gmx.de>

> Cc: Lars-Peter Clausen <lars@metafoo.de>

> Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net>

> Cc: Neil Armstrong <narmstrong@baylibre.com>

> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>

> Cc: Kevin Hilman <khilman@baylibre.com>

> Cc: Lee Jones <lee.jones@linaro.org>

> Cc: "David S. Miller" <davem@davemloft.net>

> Cc: Liam Girdwood <lgirdwood@gmail.com>

> Cc: Mark Brown <broonie@kernel.org>

> Cc: Guillaume La Roque <glaroque@baylibre.com>

> Cc: Zhang Rui <rui.zhang@intel.com>

> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>

> Cc: Thomas Gleixner <tglx@linutronix.de>

> Cc: linux-clk@vger.kernel.org

> Cc: linux-gpio@vger.kernel.org

> Cc: linux-arm-kernel@lists.infradead.org

> Cc: dri-devel@lists.freedesktop.org

> Cc: linux-iio@vger.kernel.org

> Cc: linux-media@vger.kernel.org

> Cc: linux-amlogic@lists.infradead.org

> Cc: netdev@vger.kernel.org

> Cc: linux-pm@vger.kernel.org

> Signed-off-by: Rob Herring <robh@kernel.org>

> ---

>  .../devicetree/bindings/clock/fsl,plldig.yaml |  3 +++

>  .../gpio/socionext,uniphier-gpio.yaml         |  2 ++

>  .../bindings/gpu/arm,mali-bifrost.yaml        |  6 ++---

>  .../bindings/gpu/arm,mali-midgard.yaml        |  3 +++

>  .../bindings/iio/adc/adi,ad7192.yaml          |  1 -

>  .../bindings/iio/pressure/bmp085.yaml         |  3 +++

>  .../media/amlogic,meson-gx-ao-cec.yaml        |  9 +++++---

>  .../bindings/mfd/rohm,bd71828-pmic.yaml       |  3 +++

>  .../bindings/net/ti,cpsw-switch.yaml          | 23 ++++++++++++-------

>  .../regulator/max77650-regulator.yaml         |  2 +-

>  .../bindings/thermal/amlogic,thermal.yaml     |  2 ++

>  .../bindings/timer/arm,arch_timer_mmio.yaml   |  2 ++

>  12 files changed, 43 insertions(+), 16 deletions(-)

> 

> diff --git a/Documentation/devicetree/bindings/clock/fsl,plldig.yaml

> b/Documentation/devicetree/bindings/clock/fsl,plldig.yaml

> index c8350030b374..d1c040228cf7 100644

> --- a/Documentation/devicetree/bindings/clock/fsl,plldig.yaml

> +++ b/Documentation/devicetree/bindings/clock/fsl,plldig.yaml

> @@ -21,6 +21,9 @@ properties:

>    reg:

>      maxItems: 1

>  

> +  clocks:

> +    maxItems: 1

> +

>    '#clock-cells':

>      const: 0

>  

> diff --git a/Documentation/devicetree/bindings/gpio/socionext,uniphier-

> gpio.yaml b/Documentation/devicetree/bindings/gpio/socionext,uniphier-

> gpio.yaml

> index 580a39e09d39..c58ff9a94f45 100644

> --- a/Documentation/devicetree/bindings/gpio/socionext,uniphier-gpio.yaml

> +++ b/Documentation/devicetree/bindings/gpio/socionext,uniphier-gpio.yaml

> @@ -41,6 +41,8 @@ properties:

>      minimum: 0

>      maximum: 512

>  

> +  gpio-ranges: true

> +

>    gpio-ranges-group-names:

>      $ref: /schemas/types.yaml#/definitions/string-array

>  

> diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml

> b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml

> index e8b99adcb1bd..05fd9a404ff7 100644

> --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml

> +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml

> @@ -43,6 +43,9 @@ properties:

>  

>    operating-points-v2: true

>  

> +  resets:

> +    maxItems: 2

> +

>  required:

>    - compatible

>    - reg

> @@ -57,9 +60,6 @@ allOf:

>            contains:

>              const: amlogic,meson-g12a-mali

>      then:

> -      properties:

> -        resets:

> -          minItems: 2

>        required:

>          - resets

>  

> diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml

> b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml

> index 8d966f3ff3db..6819cde050df 100644

> --- a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml

> +++ b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml

> @@ -75,6 +75,9 @@ properties:

>  

>    mali-supply: true

>  

> +  power-domains:

> +    maxItems: 1

> +

>    resets:

>      minItems: 1

>      maxItems: 2

> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml

> b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml

> index 84d25bd39488..d0913034b1d8 100644

> --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml

> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml

> @@ -106,7 +106,6 @@ examples:

>          spi-cpha;

>          clocks = <&ad7192_mclk>;

>          clock-names = "mclk";

> -        #interrupt-cells = <2>;

>          interrupts = <25 0x2>;

>          interrupt-parent = <&gpio>;

>          dvdd-supply = <&dvdd>;

> diff --git a/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml

> b/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml

> index 519137e5c170..5d4aec0e0d24 100644

> --- a/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml

> +++ b/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml

> @@ -25,6 +25,9 @@ properties:

>        - bosch,bmp280

>        - bosch,bme280

>  

> +  reg:

> +    maxItems: 1

> +

>    vddd-supply:

>      description:

>        digital voltage regulator (see regulator/regulator.txt)

> diff --git a/Documentation/devicetree/bindings/media/amlogic,meson-gx-ao-

> cec.yaml b/Documentation/devicetree/bindings/media/amlogic,meson-gx-ao-

> cec.yaml

> index 41197578f19a..e8ce37fcbfec 100644

> --- a/Documentation/devicetree/bindings/media/amlogic,meson-gx-ao-cec.yaml

> +++ b/Documentation/devicetree/bindings/media/amlogic,meson-gx-ao-cec.yaml

> @@ -24,6 +24,12 @@ properties:

>    reg:

>      maxItems: 1

>  

> +  clocks:

> +    maxItems: 1

> +

> +  clock-names:

> +    maxItems: 1

> +

>    interrupts:

>      maxItems: 1

>  

> @@ -47,7 +53,6 @@ allOf:

>              - description: AO-CEC clock

>  

>          clock-names:

> -          maxItems: 1

>            items:

>              - const: core

>  

> @@ -66,7 +71,6 @@ allOf:

>              - description: AO-CEC clock generator source

>  

>          clock-names:

> -          maxItems: 1

>            items:

>              - const: oscin

>  

> @@ -88,4 +92,3 @@ examples:

>          clock-names = "core";

>          hdmi-phandle = <&hdmi_tx>;

>      };

> -

> diff --git a/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml

> b/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml

> index 4fbb9e734284..38dc4f8b0ceb 100644

> --- a/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml

> +++ b/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml

> @@ -41,6 +41,9 @@ properties:

>    "#clock-cells":

>      const: 0

>  

> +  clock-output-names:

> +    const: bd71828-32k-out

> +

>    rohm,charger-sense-resistor-ohms:

>      minimum: 10000000

>      maximum: 50000000

> diff --git a/Documentation/devicetree/bindings/net/ti,cpsw-switch.yaml

> b/Documentation/devicetree/bindings/net/ti,cpsw-switch.yaml

> index ac8c76369a86..b9e9696da5be 100644

> --- a/Documentation/devicetree/bindings/net/ti,cpsw-switch.yaml

> +++ b/Documentation/devicetree/bindings/net/ti,cpsw-switch.yaml

> @@ -37,6 +37,12 @@ properties:

>      description:

>         The physical base address and size of full the CPSW module IO range

>  

> +  '#address-cells':

> +    const: 1

> +

> +  '#size-cells':

> +    const: 1

> +

>    ranges: true

>  

>    clocks:

> @@ -111,13 +117,6 @@ properties:

>              - reg

>              - phys

>  

> -  mdio:

> -    type: object

> -    allOf:

> -      - $ref: "ti,davinci-mdio.yaml#"

> -    description:

> -      CPSW MDIO bus.

> -

>    cpts:

>      type: object

>      description:

> @@ -148,6 +147,15 @@ properties:

>        - clocks

>        - clock-names

>  

> +patternProperties:

> +  "^mdio@":

> +    type: object

> +    allOf:

> +      - $ref: "ti,davinci-mdio.yaml#"

> +    description:

> +      CPSW MDIO bus.

> +

> +

>  required:

>    - compatible

>    - reg

> @@ -174,7 +182,6 @@ examples:

>          #address-cells = <1>;

>          #size-cells = <1>;

>          syscon = <&scm_conf>;

> -        inctrl-names = "default", "sleep";

>  

>          interrupts = <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,

>                       <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>,

> diff --git a/Documentation/devicetree/bindings/regulator/max77650-

> regulator.yaml b/Documentation/devicetree/bindings/regulator/max77650-

> regulator.yaml

> index 7d724159f890..50690487edc8 100644

> --- a/Documentation/devicetree/bindings/regulator/max77650-regulator.yaml

> +++ b/Documentation/devicetree/bindings/regulator/max77650-regulator.yaml

> @@ -24,7 +24,7 @@ properties:

>      const: maxim,max77650-regulator

>  

>  patternProperties:

> -  "^regulator@[0-3]$":

> +  "^regulator-(ldo|sbb[0-2])$":

>      $ref: "regulator.yaml#"

>  

>  required:

> diff --git a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml

> b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml

> index f761681e4c0d..93fe7b10a82e 100644

> --- a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml

> +++ b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml

> @@ -32,6 +32,8 @@ properties:

>      description: phandle to the ao-secure syscon

>      $ref: '/schemas/types.yaml#/definitions/phandle'

>  

> +  '#thermal-sensor-cells':

> +    const: 0

>  

>  required:

>    - compatible

> diff --git a/Documentation/devicetree/bindings/timer/arm,arch_timer_mmio.yaml

> b/Documentation/devicetree/bindings/timer/arm,arch_timer_mmio.yaml

> index 102f319833d9..f7ef6646bade 100644

> --- a/Documentation/devicetree/bindings/timer/arm,arch_timer_mmio.yaml

> +++ b/Documentation/devicetree/bindings/timer/arm,arch_timer_mmio.yaml

> @@ -32,6 +32,8 @@ properties:

>    '#size-cells':

>      const: 1

>  

> +  ranges: true

> +

>    clock-frequency:

>      description: The frequency of the main counter, in Hz. Should be present

>        only where necessary to work around broken firmware which does not

> configure
Jonathan Cameron March 26, 2020, 12:45 p.m. UTC | #2
On Wed, 25 Mar 2020 16:05:40 -0600
Rob Herring <robh@kernel.org> wrote:

> Numerous schemas are missing 'additionalProperties: false' statements which
> ensures a binding doesn't have any extra undocumented properties or child
> nodes. Fixing this reveals various missing properties, so let's fix all
> those occurrences.
> 
> Cc: Stephen Boyd <sboyd@kernel.org>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> Cc: Jonathan Cameron <jic23@kernel.org>
> Cc: Hartmut Knaack <knaack.h@gmx.de>
> Cc: Lars-Peter Clausen <lars@metafoo.de>
> Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
> Cc: Neil Armstrong <narmstrong@baylibre.com>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: Kevin Hilman <khilman@baylibre.com>
> Cc: Lee Jones <lee.jones@linaro.org>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Liam Girdwood <lgirdwood@gmail.com>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: Guillaume La Roque <glaroque@baylibre.com>
> Cc: Zhang Rui <rui.zhang@intel.com>
> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: linux-clk@vger.kernel.org
> Cc: linux-gpio@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: linux-iio@vger.kernel.org
> Cc: linux-media@vger.kernel.org
> Cc: linux-amlogic@lists.infradead.org
> Cc: netdev@vger.kernel.org
> Cc: linux-pm@vger.kernel.org
> Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> #for-iio

> ---
>  .../devicetree/bindings/clock/fsl,plldig.yaml |  3 +++
>  .../gpio/socionext,uniphier-gpio.yaml         |  2 ++
>  .../bindings/gpu/arm,mali-bifrost.yaml        |  6 ++---
>  .../bindings/gpu/arm,mali-midgard.yaml        |  3 +++
>  .../bindings/iio/adc/adi,ad7192.yaml          |  1 -
>  .../bindings/iio/pressure/bmp085.yaml         |  3 +++
>  .../media/amlogic,meson-gx-ao-cec.yaml        |  9 +++++---
>  .../bindings/mfd/rohm,bd71828-pmic.yaml       |  3 +++
>  .../bindings/net/ti,cpsw-switch.yaml          | 23 ++++++++++++-------
>  .../regulator/max77650-regulator.yaml         |  2 +-
>  .../bindings/thermal/amlogic,thermal.yaml     |  2 ++
>  .../bindings/timer/arm,arch_timer_mmio.yaml   |  2 ++
>  12 files changed, 43 insertions(+), 16 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/clock/fsl,plldig.yaml b/Documentation/devicetree/bindings/clock/fsl,plldig.yaml
> index c8350030b374..d1c040228cf7 100644
> --- a/Documentation/devicetree/bindings/clock/fsl,plldig.yaml
> +++ b/Documentation/devicetree/bindings/clock/fsl,plldig.yaml
> @@ -21,6 +21,9 @@ properties:
>    reg:
>      maxItems: 1
>  
> +  clocks:
> +    maxItems: 1
> +
>    '#clock-cells':
>      const: 0
>  
> diff --git a/Documentation/devicetree/bindings/gpio/socionext,uniphier-gpio.yaml b/Documentation/devicetree/bindings/gpio/socionext,uniphier-gpio.yaml
> index 580a39e09d39..c58ff9a94f45 100644
> --- a/Documentation/devicetree/bindings/gpio/socionext,uniphier-gpio.yaml
> +++ b/Documentation/devicetree/bindings/gpio/socionext,uniphier-gpio.yaml
> @@ -41,6 +41,8 @@ properties:
>      minimum: 0
>      maximum: 512
>  
> +  gpio-ranges: true
> +
>    gpio-ranges-group-names:
>      $ref: /schemas/types.yaml#/definitions/string-array
>  
> diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml
> index e8b99adcb1bd..05fd9a404ff7 100644
> --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml
> +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml
> @@ -43,6 +43,9 @@ properties:
>  
>    operating-points-v2: true
>  
> +  resets:
> +    maxItems: 2
> +
>  required:
>    - compatible
>    - reg
> @@ -57,9 +60,6 @@ allOf:
>            contains:
>              const: amlogic,meson-g12a-mali
>      then:
> -      properties:
> -        resets:
> -          minItems: 2
>        required:
>          - resets
>  
> diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml
> index 8d966f3ff3db..6819cde050df 100644
> --- a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml
> +++ b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.yaml
> @@ -75,6 +75,9 @@ properties:
>  
>    mali-supply: true
>  
> +  power-domains:
> +    maxItems: 1
> +
>    resets:
>      minItems: 1
>      maxItems: 2
> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml
> index 84d25bd39488..d0913034b1d8 100644
> --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml
> @@ -106,7 +106,6 @@ examples:
>          spi-cpha;
>          clocks = <&ad7192_mclk>;
>          clock-names = "mclk";
> -        #interrupt-cells = <2>;
>          interrupts = <25 0x2>;
>          interrupt-parent = <&gpio>;
>          dvdd-supply = <&dvdd>;
> diff --git a/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml b/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml
> index 519137e5c170..5d4aec0e0d24 100644
> --- a/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml
> +++ b/Documentation/devicetree/bindings/iio/pressure/bmp085.yaml
> @@ -25,6 +25,9 @@ properties:
>        - bosch,bmp280
>        - bosch,bme280
>  
> +  reg:
> +    maxItems: 1
> +
>    vddd-supply:
>      description:
>        digital voltage regulator (see regulator/regulator.txt)
> diff --git a/Documentation/devicetree/bindings/media/amlogic,meson-gx-ao-cec.yaml b/Documentation/devicetree/bindings/media/amlogic,meson-gx-ao-cec.yaml
> index 41197578f19a..e8ce37fcbfec 100644
> --- a/Documentation/devicetree/bindings/media/amlogic,meson-gx-ao-cec.yaml
> +++ b/Documentation/devicetree/bindings/media/amlogic,meson-gx-ao-cec.yaml
> @@ -24,6 +24,12 @@ properties:
>    reg:
>      maxItems: 1
>  
> +  clocks:
> +    maxItems: 1
> +
> +  clock-names:
> +    maxItems: 1
> +
>    interrupts:
>      maxItems: 1
>  
> @@ -47,7 +53,6 @@ allOf:
>              - description: AO-CEC clock
>  
>          clock-names:
> -          maxItems: 1
>            items:
>              - const: core
>  
> @@ -66,7 +71,6 @@ allOf:
>              - description: AO-CEC clock generator source
>  
>          clock-names:
> -          maxItems: 1
>            items:
>              - const: oscin
>  
> @@ -88,4 +92,3 @@ examples:
>          clock-names = "core";
>          hdmi-phandle = <&hdmi_tx>;
>      };
> -
> diff --git a/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml b/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml
> index 4fbb9e734284..38dc4f8b0ceb 100644
> --- a/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml
> +++ b/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml
> @@ -41,6 +41,9 @@ properties:
>    "#clock-cells":
>      const: 0
>  
> +  clock-output-names:
> +    const: bd71828-32k-out
> +
>    rohm,charger-sense-resistor-ohms:
>      minimum: 10000000
>      maximum: 50000000
> diff --git a/Documentation/devicetree/bindings/net/ti,cpsw-switch.yaml b/Documentation/devicetree/bindings/net/ti,cpsw-switch.yaml
> index ac8c76369a86..b9e9696da5be 100644
> --- a/Documentation/devicetree/bindings/net/ti,cpsw-switch.yaml
> +++ b/Documentation/devicetree/bindings/net/ti,cpsw-switch.yaml
> @@ -37,6 +37,12 @@ properties:
>      description:
>         The physical base address and size of full the CPSW module IO range
>  
> +  '#address-cells':
> +    const: 1
> +
> +  '#size-cells':
> +    const: 1
> +
>    ranges: true
>  
>    clocks:
> @@ -111,13 +117,6 @@ properties:
>              - reg
>              - phys
>  
> -  mdio:
> -    type: object
> -    allOf:
> -      - $ref: "ti,davinci-mdio.yaml#"
> -    description:
> -      CPSW MDIO bus.
> -
>    cpts:
>      type: object
>      description:
> @@ -148,6 +147,15 @@ properties:
>        - clocks
>        - clock-names
>  
> +patternProperties:
> +  "^mdio@":
> +    type: object
> +    allOf:
> +      - $ref: "ti,davinci-mdio.yaml#"
> +    description:
> +      CPSW MDIO bus.
> +
> +
>  required:
>    - compatible
>    - reg
> @@ -174,7 +182,6 @@ examples:
>          #address-cells = <1>;
>          #size-cells = <1>;
>          syscon = <&scm_conf>;
> -        inctrl-names = "default", "sleep";
>  
>          interrupts = <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
>                       <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>,
> diff --git a/Documentation/devicetree/bindings/regulator/max77650-regulator.yaml b/Documentation/devicetree/bindings/regulator/max77650-regulator.yaml
> index 7d724159f890..50690487edc8 100644
> --- a/Documentation/devicetree/bindings/regulator/max77650-regulator.yaml
> +++ b/Documentation/devicetree/bindings/regulator/max77650-regulator.yaml
> @@ -24,7 +24,7 @@ properties:
>      const: maxim,max77650-regulator
>  
>  patternProperties:
> -  "^regulator@[0-3]$":
> +  "^regulator-(ldo|sbb[0-2])$":
>      $ref: "regulator.yaml#"
>  
>  required:
> diff --git a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
> index f761681e4c0d..93fe7b10a82e 100644
> --- a/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
> +++ b/Documentation/devicetree/bindings/thermal/amlogic,thermal.yaml
> @@ -32,6 +32,8 @@ properties:
>      description: phandle to the ao-secure syscon
>      $ref: '/schemas/types.yaml#/definitions/phandle'
>  
> +  '#thermal-sensor-cells':
> +    const: 0
>  
>  required:
>    - compatible
> diff --git a/Documentation/devicetree/bindings/timer/arm,arch_timer_mmio.yaml b/Documentation/devicetree/bindings/timer/arm,arch_timer_mmio.yaml
> index 102f319833d9..f7ef6646bade 100644
> --- a/Documentation/devicetree/bindings/timer/arm,arch_timer_mmio.yaml
> +++ b/Documentation/devicetree/bindings/timer/arm,arch_timer_mmio.yaml
> @@ -32,6 +32,8 @@ properties:
>    '#size-cells':
>      const: 1
>  
> +  ranges: true
> +
>    clock-frequency:
>      description: The frequency of the main counter, in Hz. Should be present
>        only where necessary to work around broken firmware which does not configure
Linus Walleij March 27, 2020, 9:59 a.m. UTC | #3
On Wed, Mar 25, 2020 at 11:05 PM Rob Herring <robh@kernel.org> wrote:

> Numerous schemas are missing 'additionalProperties: false' statements which
> ensures a binding doesn't have any extra undocumented properties or child
> nodes. Fixing this reveals various missing properties, so let's fix all
> those occurrences.
>
> Cc: Stephen Boyd <sboyd@kernel.org>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> Cc: Jonathan Cameron <jic23@kernel.org>
> Cc: Hartmut Knaack <knaack.h@gmx.de>
> Cc: Lars-Peter Clausen <lars@metafoo.de>
> Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
> Cc: Neil Armstrong <narmstrong@baylibre.com>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: Kevin Hilman <khilman@baylibre.com>
> Cc: Lee Jones <lee.jones@linaro.org>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Liam Girdwood <lgirdwood@gmail.com>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: Guillaume La Roque <glaroque@baylibre.com>
> Cc: Zhang Rui <rui.zhang@intel.com>
> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: linux-clk@vger.kernel.org
> Cc: linux-gpio@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: linux-iio@vger.kernel.org.
> Cc: linux-media@vger.kernel.org
> Cc: linux-amlogic@lists.infradead.org
> Cc: netdev@vger.kernel.org
> Cc: linux-pm@vger.kernel.org
> Signed-off-by: Rob Herring <robh@kernel.org>

Sorry for errors caused by me,
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
Sam Ravnborg March 27, 2020, 8:21 p.m. UTC | #4
Hi Rob.

On Wed, Mar 25, 2020 at 04:05:38PM -0600, Rob Herring wrote:
> The 'adi,adxl345' definition is a duplicate as there's a full binding in:
> Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
> 
> The trivial-devices binding doesn't capture that 'adi,adxl346' has a
> fallback compatible 'adi,adxl345', so let's add it to adi,adxl345.yaml.
> 
> Cc: Michael Hennerich <michael.hennerich@analog.com>
> Cc: Jonathan Cameron <jic23@kernel.org>
> Cc: Hartmut Knaack <knaack.h@gmx.de>
> Cc: Lars-Peter Clausen <lars@metafoo.de>
> Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
> Cc: linux-iio@vger.kernel.org
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  .../devicetree/bindings/iio/accel/adi,adxl345.yaml     | 10 +++++++---
>  Documentation/devicetree/bindings/trivial-devices.yaml |  4 ----
>  2 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
> index c602b6fe1c0c..d124eba1ce54 100644
> --- a/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
> +++ b/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
> @@ -17,9 +17,13 @@ description: |
>  
>  properties:
>    compatible:
> -    enum:
> -      - adi,adxl345
> -      - adi,adxl375
> +    oneOf:
> +      - items:
> +          - const: adi,adxl346
> +          - const: adi,adxl345
> +      - enum:
> +          - adi,adxl345
> +          - adi,adxl375

I assume it is my schema understanding that is poor.
But I cannot parse the above.

The mix of items, enum and const confuses me.

I guess that if I am confused then others may end in the same situation.
Can we improve readability here or amybe add a comment?

	Sam

>  
>    reg:
>      maxItems: 1
> diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml
> index 978de7d37c66..51d1f6e43c02 100644
> --- a/Documentation/devicetree/bindings/trivial-devices.yaml
> +++ b/Documentation/devicetree/bindings/trivial-devices.yaml
> @@ -42,10 +42,6 @@ properties:
>            - adi,adt7476
>              # +/-1C TDM Extended Temp Range I.C
>            - adi,adt7490
> -            # Three-Axis Digital Accelerometer
> -          - adi,adxl345
> -            # Three-Axis Digital Accelerometer (backward-compatibility value "adi,adxl345" must be listed too)
> -          - adi,adxl346
>              # AMS iAQ-Core VOC Sensor
>            - ams,iaq-core
>              # i2c serial eeprom  (24cxx)
> -- 
> 2.20.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
Rob Herring March 31, 2020, 2:48 p.m. UTC | #5
On Fri, Mar 27, 2020 at 2:22 PM Sam Ravnborg <sam@ravnborg.org> wrote:
>
> Hi Rob.
>
> On Wed, Mar 25, 2020 at 04:05:38PM -0600, Rob Herring wrote:
> > The 'adi,adxl345' definition is a duplicate as there's a full binding in:
> > Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
> >
> > The trivial-devices binding doesn't capture that 'adi,adxl346' has a
> > fallback compatible 'adi,adxl345', so let's add it to adi,adxl345.yaml.
> >
> > Cc: Michael Hennerich <michael.hennerich@analog.com>
> > Cc: Jonathan Cameron <jic23@kernel.org>
> > Cc: Hartmut Knaack <knaack.h@gmx.de>
> > Cc: Lars-Peter Clausen <lars@metafoo.de>
> > Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
> > Cc: linux-iio@vger.kernel.org
> > Signed-off-by: Rob Herring <robh@kernel.org>
> > ---
> >  .../devicetree/bindings/iio/accel/adi,adxl345.yaml     | 10 +++++++---
> >  Documentation/devicetree/bindings/trivial-devices.yaml |  4 ----
> >  2 files changed, 7 insertions(+), 7 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
> > index c602b6fe1c0c..d124eba1ce54 100644
> > --- a/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
> > +++ b/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
> > @@ -17,9 +17,13 @@ description: |
> >
> >  properties:
> >    compatible:
> > -    enum:
> > -      - adi,adxl345
> > -      - adi,adxl375
> > +    oneOf:
> > +      - items:
> > +          - const: adi,adxl346
> > +          - const: adi,adxl345
> > +      - enum:
> > +          - adi,adxl345
> > +          - adi,adxl375
>
> I assume it is my schema understanding that is poor.
> But I cannot parse the above.
>
> The mix of items, enum and const confuses me.

compatible can be one of 3 possibilities:
"adi,adxl346", "adi,adxl345"
"adi,adxl345"
"adi,adxl375"

For a single entry, 'items' can be omitted.

> I guess that if I am confused then others may end in the same situation.
> Can we improve readability here or amybe add a comment?

example-schema.yaml explains this to some extent. I'd rather improve that.

Rob