diff mbox series

[v2,2/3] dt-bindings: pinctrl: Add apple,npins property to apple,pinctrl

Message ID 20211001191209.29988-3-joey.gouly@arm.com
State New
Headers show
Series pinctrl/GPIO driver for Apple SoCs | expand

Commit Message

Joey Gouly Oct. 1, 2021, 7:12 p.m. UTC
This property is used to describe the total number of pins on this
particular pinctrl hardware block.

Signed-off-by: Joey Gouly <joey.gouly@arm.com>
---
 Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Mark Kettenis Oct. 1, 2021, 8:01 p.m. UTC | #1
> From: Joey Gouly <joey.gouly@arm.com>
> Date: Fri, 1 Oct 2021 20:12:08 +0100
> 
> This property is used to describe the total number of pins on this
> particular pinctrl hardware block.
> 
> Signed-off-by: Joey Gouly <joey.gouly@arm.com>
> ---
>  Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml | 4 ++++
>  1 file changed, 4 insertions(+)

Adding does property doesn't break the U-Boot driver, so I'm ok with
this.  This should probably be a required property though.

> diff --git a/Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml
> index d50571affd1f..cdd8cb454e92 100644
> --- a/Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml
> +++ b/Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml
> @@ -34,6 +34,9 @@ properties:
>    gpio-ranges:
>      maxItems: 1
>  
> +  apple,npins:
> +    maxItems: 1
> +
>    interrupts:
>      description: One interrupt for each of the (up to 7) interrupt
>        groups supported by the controller sorted by interrupt group
> @@ -86,6 +89,7 @@ examples:
>          gpio-controller;
>          #gpio-cells = <2>;
>          gpio-ranges = <&pinctrl 0 0 212>;
> +        apple,npins = <212>;
>  
>          interrupt-controller;
>          interrupt-parent = <&aic>;
> -- 
> 2.17.1
> 
>
Rob Herring (Arm) Oct. 1, 2021, 11:02 p.m. UTC | #2
On Fri, 01 Oct 2021 20:12:08 +0100, Joey Gouly wrote:
> This property is used to describe the total number of pins on this
> particular pinctrl hardware block.
> 
> Signed-off-by: Joey Gouly <joey.gouly@arm.com>
> ---
>  Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml | 4 ++++
>  1 file changed, 4 insertions(+)
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml: properties:apple,npins: 'description' is a required property
	hint: Vendor specific properties must have a type and description unless they have a defined, common suffix.
	from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml#
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml: properties:apple,npins: 'oneOf' conditional failed, one must be fixed:
	'type' is a required property
		hint: A vendor boolean property can use "type: boolean"
	Additional properties are not allowed ('maxItems' was unexpected)
		hint: A vendor boolean property can use "type: boolean"
	/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml: properties:apple,npins: 'oneOf' conditional failed, one must be fixed:
		'enum' is a required property
		'const' is a required property
		hint: A vendor string property with exact values has an implicit type
		from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml#
	/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml: properties:apple,npins: 'oneOf' conditional failed, one must be fixed:
		'$ref' is a required property
		'allOf' is a required property
		hint: A vendor property needs a $ref to types.yaml
		from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml#
	hint: Vendor specific properties must have a type and description unless they have a defined, common suffix.
	from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml#
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml: ignoring, error in schema: properties: apple,npins
warning: no schema found in file: ./Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml
Documentation/devicetree/bindings/pinctrl/apple,pinctrl.example.dt.yaml:0:0: /example-0/soc/pinctrl@23c100000: failed to match any schema with compatible: ['apple,t8103-pinctrl', 'apple,pinctrl']
Documentation/devicetree/bindings/pinctrl/apple,pinctrl.example.dt.yaml:0:0: /example-0/soc/pinctrl@23c100000: failed to match any schema with compatible: ['apple,t8103-pinctrl', 'apple,pinctrl']

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/1535492

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.
Linus Walleij Oct. 3, 2021, 10:23 p.m. UTC | #3
On Fri, Oct 1, 2021 at 9:12 PM Joey Gouly <joey.gouly@arm.com> wrote:

> This property is used to describe the total number of pins on this
> particular pinctrl hardware block.
>
> Signed-off-by: Joey Gouly <joey.gouly@arm.com>

Fair enough!
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

> +  apple,npins
> +    maxItems: 1

Add some smallish description like "the number of pins in this pin
controller instance" when you resend, but no big deal.

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml
index d50571affd1f..cdd8cb454e92 100644
--- a/Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml
@@ -34,6 +34,9 @@  properties:
   gpio-ranges:
     maxItems: 1
 
+  apple,npins:
+    maxItems: 1
+
   interrupts:
     description: One interrupt for each of the (up to 7) interrupt
       groups supported by the controller sorted by interrupt group
@@ -86,6 +89,7 @@  examples:
         gpio-controller;
         #gpio-cells = <2>;
         gpio-ranges = <&pinctrl 0 0 212>;
+        apple,npins = <212>;
 
         interrupt-controller;
         interrupt-parent = <&aic>;