[PATCH 3/3] dt-bindings: gpio: rockchip,gpio add optional 'gpio-ranges'

Krzysztof Kozlowski krzysztof.kozlowski at linaro.org
Thu Sep 1 06:32:59 PDT 2022


On 01/09/2022 04:29, Jianqun Xu wrote:
> Add a optional property 'gpio-ranges', such as
>     gpio-ranges = <&pinctrl 0 0 32>;
> 
> When the gpio nodes are under pinctrl, the property 'gpio-ranges' is
> a optional property, but when they are under root node, the property
> 'gpio-ranges' is a required property.
> 
> Signed-off-by: Jianqun Xu <jay.xu at rock-chips.com>
> ---
>  .../devicetree/bindings/gpio/rockchip,gpio-bank.yaml       | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml b/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml
> index d4e42c2b995b..7a075fcea75f 100644
> --- a/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml
> +++ b/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml
> @@ -49,7 +49,12 @@ required:
>    - interrupt-controller
>    - "#interrupt-cells"
>  
> -additionalProperties: false
> +additionalProperties: true

That's not correct. It should stay false.

> +  gpio-ranges:
> +    maxItems: 1
> +    description: |
> +      The property is a optional if gpio node under pinctrl node;
> +      but it is a required property if the gpio is under root node.

This is not in proper place.

Does not look like you tested the bindings. Please run `make
dt_binding_check` (see
Documentation/devicetree/bindings/writing-schema.rst for instructions).

Best regards,
Krzysztof



More information about the Linux-rockchip mailing list