linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: gpio: max7317: add gpio driver bindings
@ 2022-12-06 12:44 Edmund Berenson
  2022-12-06 13:16 ` Rob Herring
  2022-12-06 20:30 ` Rob Herring
  0 siblings, 2 replies; 3+ messages in thread
From: Edmund Berenson @ 2022-12-06 12:44 UTC (permalink / raw)
  Cc: Edmund Berenson, Lukasz Zemla, Linus Walleij, Bartosz Golaszewski,
	Rob Herring, Krzysztof Kozlowski, linux-gpio, devicetree,
	linux-kernel

Add driver bindings for the maxim max7317 spi
gpio expander.

Co-developed-by: Lukasz Zemla <Lukasz.Zemla@woodward.com>
Signed-off-by: Lukasz Zemla <Lukasz.Zemla@woodward.com>
Signed-off-by: Edmund Berenson <edmund.berenson@emlix.com>
---
 .../bindings/gpio/gpio-max7317.yaml           | 52 +++++++++++++++++++
 1 file changed, 52 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/gpio/gpio-max7317.yaml

diff --git a/Documentation/devicetree/bindings/gpio/gpio-max7317.yaml b/Documentation/devicetree/bindings/gpio/gpio-max7317.yaml
new file mode 100644
index 000000000000..88f1fe02a627
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-max7317.yaml
@@ -0,0 +1,52 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/gpio/gpio-max7317.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Maxim MAX7317 SPI-Interfaced I/O Expander
+
+description: |
+  Bindings for 10-Port Maxim MAX7317 SPI GPIO expanders.
+
+properties:
+  compatible:
+    const: maxim,max7317
+
+  reg:
+    maxItems: 1
+
+  gpio-controller: true
+
+  '#gpio-cells':
+    const: 2
+
+  gpio-line-names:
+    minItems: 1
+    maxItems: 10
+
+required:
+  - compatible
+  - reg
+  - gpio-controller
+  - "#gpio-cells"
+
+additionalProperties: false
+
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+examples:
+  - |
+    spi {
+            #address-cells = <1>;
+            #size-cells = <0>;
+
+            gpio5: gpio5@0 {
+                    compatible = "maxim,max7317";
+                    reg = <0>;
+                    gpio-controller;
+                    #gpio-cells = <2>;
+                    spi-max-frequency = <100000>;
+            };
+    };
-- 
2.37.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] dt-bindings: gpio: max7317: add gpio driver bindings
  2022-12-06 12:44 [PATCH 1/2] dt-bindings: gpio: max7317: add gpio driver bindings Edmund Berenson
@ 2022-12-06 13:16 ` Rob Herring
  2022-12-06 20:30 ` Rob Herring
  1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2022-12-06 13:16 UTC (permalink / raw)
  To: Edmund Berenson
  Cc: Lukasz Zemla, Linus Walleij, Bartosz Golaszewski,
	Krzysztof Kozlowski, linux-gpio, devicetree, linux-kernel

On Tue, Dec 06, 2022 at 01:44:55PM +0100, Edmund Berenson wrote:
> Add driver bindings for the maxim max7317 spi
> gpio expander.

Bindings are for h/w, not drivers.

s/maxim/Maxim/
s/spi/SPI/

For the subject, no need to say 'bindings' twice:

dt-bindings: gpio: Add Maxim max7317 GPIO expander 

> 
> Co-developed-by: Lukasz Zemla <Lukasz.Zemla@woodward.com>
> Signed-off-by: Lukasz Zemla <Lukasz.Zemla@woodward.com>
> Signed-off-by: Edmund Berenson <edmund.berenson@emlix.com>
> ---
>  .../bindings/gpio/gpio-max7317.yaml           | 52 +++++++++++++++++++
>  1 file changed, 52 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/gpio/gpio-max7317.yaml
> 
> diff --git a/Documentation/devicetree/bindings/gpio/gpio-max7317.yaml b/Documentation/devicetree/bindings/gpio/gpio-max7317.yaml
> new file mode 100644
> index 000000000000..88f1fe02a627
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/gpio/gpio-max7317.yaml
> @@ -0,0 +1,52 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/gpio/gpio-max7317.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Maxim MAX7317 SPI-Interfaced I/O Expander
> +
> +description: |

Don't need '|'

> +  Bindings for 10-Port Maxim MAX7317 SPI GPIO expanders.
> +
> +properties:
> +  compatible:
> +    const: maxim,max7317
> +
> +  reg:
> +    maxItems: 1
> +
> +  gpio-controller: true
> +
> +  '#gpio-cells':
> +    const: 2
> +
> +  gpio-line-names:
> +    minItems: 1
> +    maxItems: 10
> +
> +required:
> +  - compatible
> +  - reg
> +  - gpio-controller
> +  - "#gpio-cells"
> +
> +additionalProperties: false

unevaluatedProperties: false

Or the $ref below doesn't work.

> +
> +allOf:
> +  - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +examples:
> +  - |
> +    spi {
> +            #address-cells = <1>;
> +            #size-cells = <0>;
> +
> +            gpio5: gpio5@0 {

gpio@0 {

> +                    compatible = "maxim,max7317";
> +                    reg = <0>;
> +                    gpio-controller;
> +                    #gpio-cells = <2>;
> +                    spi-max-frequency = <100000>;
> +            };
> +    };
> -- 
> 2.37.4
> 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] dt-bindings: gpio: max7317: add gpio driver bindings
  2022-12-06 12:44 [PATCH 1/2] dt-bindings: gpio: max7317: add gpio driver bindings Edmund Berenson
  2022-12-06 13:16 ` Rob Herring
@ 2022-12-06 20:30 ` Rob Herring
  1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2022-12-06 20:30 UTC (permalink / raw)
  To: Edmund Berenson
  Cc: Lukasz Zemla, linux-kernel, Rob Herring, Bartosz Golaszewski,
	Krzysztof Kozlowski, linux-gpio, devicetree, Linus Walleij


On Tue, 06 Dec 2022 13:44:55 +0100, Edmund Berenson wrote:
> Add driver bindings for the maxim max7317 spi
> gpio expander.
> 
> Co-developed-by: Lukasz Zemla <Lukasz.Zemla@woodward.com>
> Signed-off-by: Lukasz Zemla <Lukasz.Zemla@woodward.com>
> Signed-off-by: Edmund Berenson <edmund.berenson@emlix.com>
> ---
>  .../bindings/gpio/gpio-max7317.yaml           | 52 +++++++++++++++++++
>  1 file changed, 52 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/gpio/gpio-max7317.yaml
> 

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/dt-review-ci/linux/Documentation/devicetree/bindings/gpio/gpio-max7317.yaml: 'maintainers' is a required property
	hint: Metaschema for devicetree binding documentation
	from schema $id: http://devicetree.org/meta-schemas/base.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/gpio/gpio-max7317.example.dtb: gpio5@0: 'spi-max-frequency' does not match any of the regexes: 'pinctrl-[0-9]+'
	From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/gpio/gpio-max7317.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20221206124456.4159-1-edmund.berenson@emlix.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

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 after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-12-06 20:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-06 12:44 [PATCH 1/2] dt-bindings: gpio: max7317: add gpio driver bindings Edmund Berenson
2022-12-06 13:16 ` Rob Herring
2022-12-06 20:30 ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).