Re: [PATCH 8/8] dt-bindings: gpio: dw-apb: remove never-used "snps,dw-apb-gpio-port"

From: Serge Semin
Date: Thu Oct 15 2020 - 08:05:10 EST


On Thu, Oct 15, 2020 at 11:59:03AM +0800, Jisheng Zhang wrote:
> The compatible string is never used.

Before sending v2 could you run "make dt_binding_check" for the DT schema
modified in this patch? Like this:

make -j8 ARCH=mips CROSS_COMPILE=mipsel-baikal-linux- dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml

>
> Signed-off-by: Jisheng Zhang <Jisheng.Zhang@xxxxxxxxxxxxx>
> ---
> Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml b/Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml
> index 1240f6289249..76e7b07d592f 100644
> --- a/Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml
> +++ b/Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml
> @@ -50,9 +50,6 @@ patternProperties:
> "^gpio-(port|controller)@[0-9a-f]+$":
> type: object
> properties:

> - compatible:
> - const: snps,dw-apb-gpio-port
> -

Yep, you've removed the "compatible" property but forgot to do the same from the
"required:" property of the sub-nodes schema. That's why the suggested
make-command above would have failed during the DT schema examples validation if
you ran it. Please, fix it and resend the series.

> reg:
> maxItems: 1

Yeah. Here I've forgotten to add the "reg" property constraints. Since certainly
the controller won't have more than four sub-nodes by design, could you add one
in an additional patch of the series since you'll need to resend the patchset anyway?
Like this:
reg:
- maxItems: 1
+ minimum: 0
+ maximum: 3

-Sergey

>
> @@ -111,7 +108,6 @@ examples:
> #size-cells = <0>;
>
> porta: gpio-port@0 {
> - compatible = "snps,dw-apb-gpio-port";
> reg = <0>;
> gpio-controller;
> #gpio-cells = <2>;
> @@ -123,7 +119,6 @@ examples:
> };
>
> portb: gpio-port@1 {
> - compatible = "snps,dw-apb-gpio-port";
> reg = <1>;
> gpio-controller;
> #gpio-cells = <2>;
> --
> 2.28.0
>