Skip to contentSkip to conversation

gpio: add common dtschema

PATCH In review Krzysztof Kozlowski 7 participants 28 messages Sep 17, 2020 – Sep 22, 2020

Subsystems (29)
lore
Share & tools
lore
#0 lore raw

v2 cover gpio: add common dtschema

Hi,

Changes since v1
================
1. Use common schema in bindings outside of gpio/ (new patches).
2. Minor fixes - see individual patches for changelogs.

Notes
=====
This is independent work of pca953x bindings:
https://lore.kernel.org/lkml/[email protected]/T/#u

The DTS patches can be also applied independently. The bindings patches depend on first one, adding common schema.

Best regards,
Krzysztof

Krzysztof Kozlowski (13):
dt-bindings: gpio: add common schema for GPIO controllers
dt-bindings: gpio: include common schema in GPIO controllers
dt-bindings: gpio: pl061: add missing properties and include common
schema
dt-bindings: gpio: fsl-imx-gpio: add i.MX ARMv6 and ARMv7 compatibles
dt-bindings: gpio: fsl-imx-gpio: add gpio-line-names
dt-bindings: gpio: gpio-vf610: fix iMX 7ULP compatible matching
dt-bindings: media: include common schema in GPIO controllers
dt-bindings: mfd: include common schema in GPIO controllers
dt-bindings: pinctrl: include common schema in GPIO controllers
ASoC: dt-bindings: zl38060: include common schema in GPIO controllers
arm64: dts: imx8mq-librem5: correct GPIO hog property
arm64: dts: imx8mq-librem5: align GPIO hog names with dtschema
ARM: dts: imx: align GPIO hog names with dtschema

 .../bindings/gpio/brcm,xgs-iproc-gpio.yaml    |   3 +
 .../bindings/gpio/fsl-imx-gpio.yaml           |  17 ++-
 .../devicetree/bindings/gpio/gpio-common.yaml | 125 ++++++++++++++++++
 .../devicetree/bindings/gpio/gpio-mxs.yaml    |   4 +
 .../bindings/gpio/gpio-pca9570.yaml           |   3 +
 .../devicetree/bindings/gpio/gpio-rda.yaml    |   3 +
 .../devicetree/bindings/gpio/gpio-vf610.yaml  |  11 +-
 .../devicetree/bindings/gpio/mrvl-gpio.yaml   |   1 +
 .../devicetree/bindings/gpio/pl061-gpio.yaml  |   6 +
 .../bindings/gpio/qcom,wcd934x-gpio.yaml      |   3 +
 .../bindings/gpio/renesas,em-gio.yaml         |   3 +
 .../bindings/gpio/renesas,rcar-gpio.yaml      |   3 +
 .../devicetree/bindings/gpio/sifive,gpio.yaml |   3 +
 .../bindings/gpio/snps,dw-apb-gpio.yaml       |   3 +
 .../gpio/socionext,uniphier-gpio.yaml         |   3 +
 .../bindings/gpio/xylon,logicvc-gpio.yaml     |   3 +
 .../bindings/media/i2c/maxim,max9286.yaml     |   3 +
 .../bindings/mfd/cirrus,madera.yaml           |   1 +
 .../devicetree/bindings/mfd/max77650.yaml     |   3 +
 .../bindings/mfd/rohm,bd71828-pmic.yaml       |   3 +
 .../devicetree/bindings/mfd/st,stmfx.yaml     |   2 +
 .../devicetree/bindings/mfd/wlf,arizona.yaml  |   1 +
 .../pinctrl/actions,s500-pinctrl.yaml         |   3 +
 .../pinctrl/allwinner,sun4i-a10-pinctrl.yaml  |   1 +
 .../bindings/pinctrl/cirrus,lochnagar.yaml    |   3 +
 .../bindings/pinctrl/ingenic,pinctrl.yaml     |   3 +
 .../pinctrl/mediatek,mt6779-pinctrl.yaml      |   3 +
 .../bindings/pinctrl/pinctrl-mt8192.yaml      |   3 +
 .../pinctrl/qcom,ipq6018-pinctrl.yaml         |   3 +
 .../pinctrl/qcom,msm8226-pinctrl.yaml         |   3 +
 .../bindings/pinctrl/qcom,sm8250-pinctrl.yaml |   3 +
 .../pinctrl/renesas,rza2-pinctrl.yaml         |   3 +
 .../bindings/pinctrl/st,stm32-pinctrl.yaml    |   3 +
 .../devicetree/bindings/sound/zl38060.yaml    |   3 +
 arch/arm/boot/dts/imx51-zii-rdu1.dts          |   2 +-
 arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi       |   8 +-
 arch/arm/boot/dts/imx6ul-ccimx6ulsbcpro.dts   |   2 +-
 .../boot/dts/freescale/imx8mq-librem5.dtsi    |   4 +-
 38 files changed, 245 insertions(+), 12 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/gpio/gpio-common.yaml
Signature · 7 lines
2.17.1


_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
#1 lore raw

PATCH v2 1/13 dt-bindings: gpio: add common schema for GPIO controllers

Convert parts of gpio.txt bindings into common dtschema file for GPIO controllers. The schema enforces proper naming of GPIO controller nodes and GPIO hogs.

The schema should be included by specific GPIO controllers bindings.

---

Changes since v1:
1. Do not require compatible (some child nodes are gpio-controllers without the compatible).

---
 .../devicetree/bindings/gpio/gpio-common.yaml | 125 ++++++++++++++++++
 1 file changed, 125 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/gpio/gpio-common.yaml
Documentation/devicetree/bindings/gpio/gpio-common.yaml new file +125 -0
new file mode 100644
index 000000000000..af9f6c7feeec
@@ -0,0 +1,125 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/gpio/gpio-common.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Common GPIO controller properties
+
+maintainers:
+  - Krzysztof Kozlowski <[email protected]>
+  - Linus Walleij <[email protected]>
+
+properties:
+  nodename:
+    pattern: "^(gpio-controller|gpio)(@[0-9a-f]+|-[0-9a-f]+)?$"
+
+  '#gpio-cells': true
+  gpio-controller: true
+  gpio-ranges: true
+
+  gpio-line-names:
+    description: |
+      Optionally, a GPIO controller may have a "gpio-line-names" property. This
+      is an array of strings defining the names of the GPIO lines going out of
+      the GPIO controller. This name should be the most meaningful producer
+      name for the system, such as a rail name indicating the usage. Package
+      names such as pin name are discouraged: such lines have opaque names
+      (since they are by definition generic purpose) and such names are usually
+      not very helpful.
+
+      For example "MMC-CD", "Red LED Vdd" and "ethernet reset" are reasonable
+      line names as they describe what the line is used for. "GPIO0" is not a
+      good name to give to a GPIO line.
+
+      Placeholders are discouraged: rather use the "" (blank string) if the use
+      of the GPIO line is undefined in your design. The names are assigned
+      starting from line offset 0 from left to right from the passed array. An
+      incomplete array (where the number of passed named are less than ngpios)
+      will still be used up until the last provided valid line index.
+
+  gpio-reserved-ranges:
+    description:
+      Indicates the start and size of the GPIOs that can't be used.
+
+  ngpios:
+    description: |
+      Optionally, a GPIO controller may have a "ngpios" property. This property
+      indicates the number of in-use slots of available slots for GPIOs. The
+      typical example is something like this: the hardware register is 32 bits
+      wide, but only 18 of the bits have a physical counterpart. The driver is
+      generally written so that all 32 bits can be used, but the IP block is
+      reused in a lot of designs, some using all 32 bits, some using 18 and
+      some using 12. In this case, setting "ngpios = <18>;" informs the driver
+      that only the first 18 GPIOs, at local offset 0 .. 17, are in use.
+
+      If these GPIOs do not happen to be the first N GPIOs at offset 0...N-1,
+      an additional set of tuples is needed to specify which GPIOs are
+      unusable, with the gpio-reserved-ranges binding.
+
+patternProperties:
+  "^(hog-[0-9]+|.+-hog(-[0-9]+)?)$":
+    type: object
+    description:
+      The GPIO chip may contain GPIO hog definitions. GPIO hogging is a mechanism
+      providing automatic GPIO request and configuration as part of the
+      gpio-controller's driver probe function.
+      Each GPIO hog definition is represented as a child node of the GPIO controller.
+
+    properties:
+      gpio-hog: true
+      gpios: true
+      input: true
+      output-high: true
+      output-low: true
+      line-name:
+        description:
+          The GPIO label name. If not present the node name is used.
+
+    required:
+      - gpio-hog
+      - gpios
+
+    oneOf:
+      - required:
+          - input
+      - required:
+          - output-high
+      - required:
+          - output-low
+
+    additionalProperties: false
+
+required:
+  - "#gpio-cells"
+  - gpio-controller
+
+examples:
+  - |
+    gpio-controller@15000000 {
+        compatible = "foo";
+        reg = <0x15000000 0x1000>;
+        gpio-controller;
+        #gpio-cells = <2>;
+        ngpios = <18>;
+        gpio-reserved-ranges = <0 4>, <12 2>;
+        gpio-line-names = "MMC-CD", "MMC-WP", "VDD eth", "RST eth", "LED R",
+                          "LED G", "LED B", "Col A", "Col B", "Col C", "Col D",
+                          "Row A", "Row B", "Row C", "Row D", "NMI button",
+                          "poweroff", "reset";
+    };
+
+  - |
+    gpio-controller@1400 {
+        compatible = "fsl,qe-pario-bank-a", "fsl,qe-pario-bank";
+        reg = <0x1400 0x18>;
+        gpio-controller;
+        #gpio-cells = <2>;
+
+        line-b-hog {
+            gpio-hog;
+            gpios = <6 0>;
+            input;
+            line-name = "foo-bar-gpio";
+        };
+    };
Signature · 7 lines
2.17.1


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
#2 lore raw

Re: [PATCH v2 01/13] dt-bindings: gpio: add common schema for GPIO controllers

Hi Krzysztof,

Thank you for the patch.

Quoted 2 lines · Krzysztof Kozlowski

Convert parts of gpio.txt bindings into common dtschema file for GPIO controllers.

How about deleting the part that has been converted from gpio.txt ?

Quoted 4 lines

The schema enforces proper naming of GPIO controller nodes and GPIO hogs.

The schema should be included by specific GPIO controllers bindings.

Instead of including it manually, could we use a conditional select: to apply the schema automatically when a gpio-controller property is present ?

Quoted 143 lines

---

Changes since v1:
1. Do not require compatible (some child nodes are gpio-controllers without the compatible).

---
 .../devicetree/bindings/gpio/gpio-common.yaml | 125 ++++++++++++++++++
 1 file changed, 125 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/gpio/gpio-common.yaml
Documentation/devicetree/bindings/gpio/gpio-common.yaml new file +125 -0
new file mode 100644
index 000000000000..af9f6c7feeec
@@ -0,0 +1,125 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/gpio/gpio-common.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Common GPIO controller properties
+
+maintainers:
+  - Krzysztof Kozlowski <[email protected]>
+  - Linus Walleij <[email protected]>
+
+properties:
+  nodename:
+    pattern: "^(gpio-controller|gpio)(@[0-9a-f]+|-[0-9a-f]+)?$"
+
+  '#gpio-cells': true
+  gpio-controller: true
+  gpio-ranges: true
+
+  gpio-line-names:
+    description: |
+      Optionally, a GPIO controller may have a "gpio-line-names" property. This
+      is an array of strings defining the names of the GPIO lines going out of
+      the GPIO controller. This name should be the most meaningful producer
+      name for the system, such as a rail name indicating the usage. Package
+      names such as pin name are discouraged: such lines have opaque names
+      (since they are by definition generic purpose) and such names are usually
+      not very helpful.
+
+      For example "MMC-CD", "Red LED Vdd" and "ethernet reset" are reasonable
+      line names as they describe what the line is used for. "GPIO0" is not a
+      good name to give to a GPIO line.
+
+      Placeholders are discouraged: rather use the "" (blank string) if the use
+      of the GPIO line is undefined in your design. The names are assigned
+      starting from line offset 0 from left to right from the passed array. An
+      incomplete array (where the number of passed named are less than ngpios)
+      will still be used up until the last provided valid line index.
+
+  gpio-reserved-ranges:
+    description:
+      Indicates the start and size of the GPIOs that can't be used.
+
+  ngpios:
+    description: |
+      Optionally, a GPIO controller may have a "ngpios" property. This property
+      indicates the number of in-use slots of available slots for GPIOs. The
+      typical example is something like this: the hardware register is 32 bits
+      wide, but only 18 of the bits have a physical counterpart. The driver is
+      generally written so that all 32 bits can be used, but the IP block is
+      reused in a lot of designs, some using all 32 bits, some using 18 and
+      some using 12. In this case, setting "ngpios = <18>;" informs the driver
+      that only the first 18 GPIOs, at local offset 0 .. 17, are in use.
+
+      If these GPIOs do not happen to be the first N GPIOs at offset 0...N-1,
+      an additional set of tuples is needed to specify which GPIOs are
+      unusable, with the gpio-reserved-ranges binding.
+
+patternProperties:
+  "^(hog-[0-9]+|.+-hog(-[0-9]+)?)$":
+    type: object
+    description:
+      The GPIO chip may contain GPIO hog definitions. GPIO hogging is a mechanism
+      providing automatic GPIO request and configuration as part of the
+      gpio-controller's driver probe function.
+      Each GPIO hog definition is represented as a child node of the GPIO controller.
+
+    properties:
+      gpio-hog: true
+      gpios: true
+      input: true
+      output-high: true
+      output-low: true
+      line-name:
+        description:
+          The GPIO label name. If not present the node name is used.
+
+    required:
+      - gpio-hog
+      - gpios
+
+    oneOf:
+      - required:
+          - input
+      - required:
+          - output-high
+      - required:
+          - output-low
+
+    additionalProperties: false
+
+required:
+  - "#gpio-cells"
+  - gpio-controller
+
+examples:
+  - |
+    gpio-controller@15000000 {
+        compatible = "foo";
+        reg = <0x15000000 0x1000>;
+        gpio-controller;
+        #gpio-cells = <2>;
+        ngpios = <18>;
+        gpio-reserved-ranges = <0 4>, <12 2>;
+        gpio-line-names = "MMC-CD", "MMC-WP", "VDD eth", "RST eth", "LED R",
+                          "LED G", "LED B", "Col A", "Col B", "Col C", "Col D",
+                          "Row A", "Row B", "Row C", "Row D", "NMI button",
+                          "poweroff", "reset";
+    };
+
+  - |
+    gpio-controller@1400 {
+        compatible = "fsl,qe-pario-bank-a", "fsl,qe-pario-bank";
+        reg = <0x1400 0x18>;
+        gpio-controller;
+        #gpio-cells = <2>;
+
+        line-b-hog {
+            gpio-hog;
+            gpios = <6 0>;
+            input;
+            line-name = "foo-bar-gpio";
+        };
+    };
Signature · 3 lines
Regards,

Laurent Pinchart
#3 lore raw

Re: [PATCH v2 01/13] dt-bindings: gpio: add common schema for GPIO controllers

Quoted 10 lines · Laurent Pinchart

Hi Krzysztof,

Thank you for the patch.

Quoted 2 lines · Krzysztof Kozlowski

Convert parts of gpio.txt bindings into common dtschema file for GPIO controllers.

How about deleting the part that has been converted from gpio.txt ?

I did not move everything from the gpio.txt and it is really nicely explained there. I think to leave it as it works as a overview/guide better than YAML.

Quoted 9 lines
Quoted 5 lines

The schema enforces proper naming of GPIO controller nodes and GPIO hogs.

The schema should be included by specific GPIO controllers bindings.

Instead of including it manually, could we use a conditional select: to apply the schema automatically when a gpio-controller property is present ?

You mean the same way as generic schema for GPIO controllers work? This could be done but the point is to enforce the GPIO controller bindings in GPIO controllers, so also in cases when someone forgets to add "gpio-controller" property. Although, if given GPIO controller schema requires "gpio-controller" then indeed select would work...

Best regards,
Krzysztof

#4 lore raw

Re: [PATCH v2 01/13] dt-bindings: gpio: add common schema for GPIO controllers

Hi Krzysztof,

Quoted 10 lines · Krzysztof Kozlowski
Quoted 5 lines · Laurent Pinchart
Quoted 2 lines · Krzysztof Kozlowski

Convert parts of gpio.txt bindings into common dtschema file for GPIO controllers.

How about deleting the part that has been converted from gpio.txt ?

I did not move everything from the gpio.txt and it is really nicely explained there. I think to leave it as it works as a overview/guide better than YAML.

I'm just a bit worried that duplicating some of the information in two places will lead to them becoming out of sync, but maybe the risk isn't that high.

Quoted 9 lines
Quoted 8 lines
Quoted 4 lines

The schema enforces proper naming of GPIO controller nodes and GPIO hogs.

The schema should be included by specific GPIO controllers bindings.

Instead of including it manually, could we use a conditional select: to apply the schema automatically when a gpio-controller property is present ?

Quoted 5 lines

You mean the same way as generic schema for GPIO controllers work? This could be done but the point is to enforce the GPIO controller bindings in GPIO controllers, so also in cases when someone forgets to add "gpio-controller" property. Although, if given GPIO controller schema requires "gpio-controller" then indeed select would work...

You could just make gpio-controller mandatory in the schema, and get everything else automatically selected based on that, without needing a manual $ref.

Signature · 3 lines
Regards,

Laurent Pinchart
#5 lore raw

Re: [PATCH v2 01/13] dt-bindings: gpio: add common schema for GPIO controllers

In reply to Krzysztof Kozlowski
Quoted 4 lines · Krzysztof Kozlowski

Convert parts of gpio.txt bindings into common dtschema file for GPIO controllers. The schema enforces proper naming of GPIO controller nodes and GPIO hogs.

Did you not see my previous reply about a common schema? We already have a common GPIO and hog schema in dtschema. Please add to it whatever is missing.

My goal is all common schema end up in dtschema, but I haven't pushed folks to do that yet. Ones I've done are there though. One issue is what's in dtschema should be GPL/BSD and the existing text bindings are default GPL, so there's a relicensing exercise. In some cases, the schema is there but I haven't copied over the descriptions.

Rob

Quoted 87 lines
Documentation/devicetree/bindings/gpio/gpio-common.yaml new file +84 -1
+    description:
+      Indicates the start and size of the GPIOs that can't be used.
+
+  ngpios:
+    description: |
+      Optionally, a GPIO controller may have a "ngpios" property. This property
+      indicates the number of in-use slots of available slots for GPIOs. The
+      typical example is something like this: the hardware register is 32 bits
+      wide, but only 18 of the bits have a physical counterpart. The driver is
+      generally written so that all 32 bits can be used, but the IP block is
+      reused in a lot of designs, some using all 32 bits, some using 18 and
+      some using 12. In this case, setting "ngpios = <18>;" informs the driver
+      that only the first 18 GPIOs, at local offset 0 .. 17, are in use.
+
+      If these GPIOs do not happen to be the first N GPIOs at offset 0...N-1,
+      an additional set of tuples is needed to specify which GPIOs are
+      unusable, with the gpio-reserved-ranges binding.
+
+patternProperties:
+  "^(hog-[0-9]+|.+-hog(-[0-9]+)?)$":
+    type: object
+    description:
+      The GPIO chip may contain GPIO hog definitions. GPIO hogging is a mechanism
+      providing automatic GPIO request and configuration as part of the
+      gpio-controller's driver probe function.
+      Each GPIO hog definition is represented as a child node of the GPIO controller.
+
+    properties:
+      gpio-hog: true
+      gpios: true
+      input: true
+      output-high: true
+      output-low: true
+      line-name:
+        description:
+          The GPIO label name. If not present the node name is used.
+
+    required:
+      - gpio-hog
+      - gpios
+
+    oneOf:
+      - required:
+          - input
+      - required:
+          - output-high
+      - required:
+          - output-low
+
+    additionalProperties: false
+
+required:
+  - "#gpio-cells"
+  - gpio-controller
+
+examples:
+  - |
+    gpio-controller@15000000 {
+        compatible = "foo";
+        reg = <0x15000000 0x1000>;
+        gpio-controller;
+        #gpio-cells = <2>;
+        ngpios = <18>;
+        gpio-reserved-ranges = <0 4>, <12 2>;
+        gpio-line-names = "MMC-CD", "MMC-WP", "VDD eth", "RST eth", "LED R",
+                          "LED G", "LED B", "Col A", "Col B", "Col C", "Col D",
+                          "Row A", "Row B", "Row C", "Row D", "NMI button",
+                          "poweroff", "reset";
+    };
+
+  - |
+    gpio-controller@1400 {
+        compatible = "fsl,qe-pario-bank-a", "fsl,qe-pario-bank";
+        reg = <0x1400 0x18>;
+        gpio-controller;
+        #gpio-cells = <2>;
+
+        line-b-hog {
+            gpio-hog;
+            gpios = <6 0>;
+            input;
+            line-name = "foo-bar-gpio";
+        };
+    };
--

2.17.1

#6 lore raw

Re: [PATCH v2 01/13] dt-bindings: gpio: add common schema for GPIO controllers

Quoted 9 lines · Rob Herring
Quoted 4 lines · Krzysztof Kozlowski

Convert parts of gpio.txt bindings into common dtschema file for GPIO controllers. The schema enforces proper naming of GPIO controller nodes and GPIO hogs.

Did you not see my previous reply about a common schema? We already have a common GPIO and hog schema in dtschema. Please add to it whatever is missing.

Indeed, I'll enhance the dt-schema.

The trouble is that each in-kernel YAML file still has to mention possible gpio-hogs nodes. Is the proper solution to put them in common YAML inside kernel sources?

Quoted 6 lines

My goal is all common schema end up in dtschema, but I haven't pushed folks to do that yet. Ones I've done are there though. One issue is what's in dtschema should be GPL/BSD and the existing text bindings are default GPL, so there's a relicensing exercise. In some cases, the schema is there but I haven't copied over the descriptions.

Right, I'll skip the descriptions when posting to dt-schema.

Best regards,
Krzysztof

maintainer
#7 lore raw

Re: [PATCH v2 01/13] dt-bindings: gpio: add common schema for GPIO controllers

Quoted 11 lines · Krzysztof Kozlowski
Quoted 9 lines · Rob Herring
Quoted 4 lines · Krzysztof Kozlowski

Convert parts of gpio.txt bindings into common dtschema file for GPIO controllers. The schema enforces proper naming of GPIO controller nodes and GPIO hogs.

Did you not see my previous reply about a common schema? We already have a common GPIO and hog schema in dtschema. Please add to it whatever is missing.

Quoted 5 lines

Indeed, I'll enhance the dt-schema.

The trouble is that each in-kernel YAML file still has to mention possible gpio-hogs nodes. Is the proper solution to put them in common YAML inside kernel sources?

Currently, the gpio.yaml schema is applied to all nodes. That has the advantage that GPIO related properties are always checked whether we have a device specific schema or not. It has the disadvantage that you can't do some constraints like required properties or what's in child nodes.

We could (and probably should) change it to be referenced by specific gpio controller schemas like we do for i2c, spi, etc. Then you can define required properties there and do something like:

"-hogs$":
type: object
$ref: gpio-hogs.yaml#

Quoted 7 lines
Quoted 5 lines

My goal is all common schema end up in dtschema, but I haven't pushed folks to do that yet. Ones I've done are there though. One issue is what's in dtschema should be GPL/BSD and the existing text bindings are default GPL, so there's a relicensing exercise. In some cases, the schema is there but I haven't copied over the descriptions.

Right, I'll skip the descriptions when posting to dt-schema.

I was hoping someone would add the descriptions. :)

Rob

#8 lore raw

PATCH v2 2/13 dt-bindings: gpio: include common schema in GPIO controllers

In reply to Krzysztof Kozlowski

Include the common GPIO schema in GPIO controllers to be sure all common properties are properly validated.

---

Changes since v1:
1. Fix gpio-mxs.yaml
2. Add snps,dw-apb-gpio.yaml

---
 .../devicetree/bindings/gpio/brcm,xgs-iproc-gpio.yaml         | 3 +++
 Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml      | 3 +++
 Documentation/devicetree/bindings/gpio/gpio-mxs.yaml          | 4 ++++
 Documentation/devicetree/bindings/gpio/gpio-pca9570.yaml      | 3 +++
 Documentation/devicetree/bindings/gpio/gpio-rda.yaml          | 3 +++
 Documentation/devicetree/bindings/gpio/gpio-vf610.yaml        | 3 +++
 Documentation/devicetree/bindings/gpio/mrvl-gpio.yaml         | 1 +
 Documentation/devicetree/bindings/gpio/qcom,wcd934x-gpio.yaml | 3 +++
 Documentation/devicetree/bindings/gpio/renesas,em-gio.yaml    | 3 +++
 Documentation/devicetree/bindings/gpio/renesas,rcar-gpio.yaml | 3 +++
 Documentation/devicetree/bindings/gpio/sifive,gpio.yaml       | 3 +++
 Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml  | 3 +++
 .../devicetree/bindings/gpio/socionext,uniphier-gpio.yaml     | 3 +++
 .../devicetree/bindings/gpio/xylon,logicvc-gpio.yaml          | 3 +++
 14 files changed, 41 insertions(+)
Documentation/devicetree/bindings/gpio/brcm,xgs-iproc-gpio.yaml +3 -0
index c213cb9ddb9f..1ac69b9c03f9 100644
@@ -13,6 +13,9 @@ description: |
   This controller is the Chip Common A GPIO present on a number of Broadcom
   switch ASICs with integrated SoCs.
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   compatible:
     const: brcm,iproc-gpio-cca
Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml +3 -0
index de0b9b5f6a70..737756e081fb 100644
@@ -9,6 +9,9 @@ title: Freescale i.MX/MXC GPIO controller
 maintainers:
   - Anson Huang <[email protected]>
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   compatible:
     oneOf:
Documentation/devicetree/bindings/gpio/gpio-mxs.yaml +4 -0
index dfa1133f8c5e..bd0c4f329625 100644
@@ -34,6 +34,10 @@ properties:
 patternProperties:
   "gpio@[0-9]+$":
     type: object
+
+    allOf:
+      - $ref: gpio-common.yaml#
+
     properties:
       compatible:
         enum:
Documentation/devicetree/bindings/gpio/gpio-pca9570.yaml +3 -0
index 338c5312a106..69b12041c893 100644
@@ -9,6 +9,9 @@ title: PCA9570 I2C GPO expander
 maintainers:
   - Sungbo Eo <[email protected]>
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   compatible:
     enum:
Documentation/devicetree/bindings/gpio/gpio-rda.yaml +3 -0
index 6ece555f074f..d70c99f463c2 100644
@@ -9,6 +9,9 @@ title: RDA Micro GPIO controller
 maintainers:
   - Manivannan Sadhasivam <[email protected]>
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   compatible:
     const: rda,8810pl-gpio
Documentation/devicetree/bindings/gpio/gpio-vf610.yaml +3 -0
index 6ac5a78ad3da..82f3e4b407d1 100644
@@ -17,6 +17,9 @@ description: |
   Note: Each GPIO port should have an alias correctly numbered in "aliases"
   node.
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   compatible:
     enum:
Documentation/devicetree/bindings/gpio/mrvl-gpio.yaml +1 -0
index 4db3b8a3332c..e2b7d2d133a8 100644
@@ -12,6 +12,7 @@ maintainers:
   - Rob Herring <[email protected]>
 
 allOf:
+  - $ref: gpio-common.yaml#
   - if:
       properties:
         compatible:
Documentation/devicetree/bindings/gpio/qcom,wcd934x-gpio.yaml +3 -0
index 32a566ec3558..2eee374e8396 100644
@@ -13,6 +13,9 @@ description: |
   Qualcomm Technologies Inc WCD9340/WCD9341 Audio Codec has integrated
   gpio controller to control 5 gpios on the chip.
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   compatible:
     enum:
Documentation/devicetree/bindings/gpio/renesas,em-gio.yaml +3 -0
index 8bdef812c87c..845689807678 100644
@@ -9,6 +9,9 @@ title: Renesas EMMA Mobile General Purpose I/O Interface
 maintainers:
   - Magnus Damm <[email protected]>
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   compatible:
     const: renesas,em-gio
Documentation/devicetree/bindings/gpio/renesas,rcar-gpio.yaml +3 -0
index 5026662e4508..c116000d579f 100644
@@ -9,6 +9,9 @@ title: Renesas R-Car General-Purpose Input/Output Ports (GPIO)
 maintainers:
   - Geert Uytterhoeven <[email protected]>
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   compatible:
     oneOf:
Documentation/devicetree/bindings/gpio/sifive,gpio.yaml +3 -0
index a0efd8dc2538..f2d93b40fc7e 100644
@@ -10,6 +10,9 @@ maintainers:
   - Yash Shah <[email protected]>
   - Paul Walmsley <[email protected]>
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   compatible:
     items:
Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml +3 -0
index b391cc1b4590..459aafe5fd47 100644
@@ -49,6 +49,9 @@ properties:
 patternProperties:
   "^gpio-(port|controller)@[0-9a-f]+$":
     type: object
+    allOf:
+      - $ref: gpio-common.yaml#
+
     properties:
       compatible:
         const: snps,dw-apb-gpio-port
Documentation/devicetree/bindings/gpio/socionext,uniphier-gpio.yaml +3 -0
index c58ff9a94f45..94a911e9c313 100644
@@ -9,6 +9,9 @@ title: UniPhier GPIO controller
 maintainers:
   - Masahiro Yamada <[email protected]>
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   $nodename:
     pattern: "^gpio@[0-9a-f]+$"
Documentation/devicetree/bindings/gpio/xylon,logicvc-gpio.yaml +3 -0
index a36aec27069c..0e4581241b3f 100644
@@ -23,6 +23,9 @@ description: |
   - EN_VEE (power control) mapped to index 7
   - V_EN (power control) mapped to index 8
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   $nodename:
     pattern: "^gpio@[0-9a-f]+$"
Signature · 1 line
2.17.1
#9 lore raw

Re: [PATCH v2 02/13] dt-bindings: gpio: include common schema in GPIO controllers

Hi Krzysztof,

Thank you for the patch.

Quoted 2 lines · Krzysztof Kozlowski

Include the common GPIO schema in GPIO controllers to be sure all common properties are properly validated.

Same comment as for patch 09/13, shouldn't we delete redundant properties from all these schemas ?

Quoted 219 lines

---

Changes since v1:
1. Fix gpio-mxs.yaml
2. Add snps,dw-apb-gpio.yaml

---
 .../devicetree/bindings/gpio/brcm,xgs-iproc-gpio.yaml         | 3 +++
 Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml      | 3 +++
 Documentation/devicetree/bindings/gpio/gpio-mxs.yaml          | 4 ++++
 Documentation/devicetree/bindings/gpio/gpio-pca9570.yaml      | 3 +++
 Documentation/devicetree/bindings/gpio/gpio-rda.yaml          | 3 +++
 Documentation/devicetree/bindings/gpio/gpio-vf610.yaml        | 3 +++
 Documentation/devicetree/bindings/gpio/mrvl-gpio.yaml         | 1 +
 Documentation/devicetree/bindings/gpio/qcom,wcd934x-gpio.yaml | 3 +++
 Documentation/devicetree/bindings/gpio/renesas,em-gio.yaml    | 3 +++
 Documentation/devicetree/bindings/gpio/renesas,rcar-gpio.yaml | 3 +++
 Documentation/devicetree/bindings/gpio/sifive,gpio.yaml       | 3 +++
 Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml  | 3 +++
 .../devicetree/bindings/gpio/socionext,uniphier-gpio.yaml     | 3 +++
 .../devicetree/bindings/gpio/xylon,logicvc-gpio.yaml          | 3 +++
 14 files changed, 41 insertions(+)
Documentation/devicetree/bindings/gpio/brcm,xgs-iproc-gpio.yaml +3 -0
index c213cb9ddb9f..1ac69b9c03f9 100644
@@ -13,6 +13,9 @@ description: |
   This controller is the Chip Common A GPIO present on a number of Broadcom
   switch ASICs with integrated SoCs.
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   compatible:
     const: brcm,iproc-gpio-cca
Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml +3 -0
index de0b9b5f6a70..737756e081fb 100644
@@ -9,6 +9,9 @@ title: Freescale i.MX/MXC GPIO controller
 maintainers:
   - Anson Huang <[email protected]>
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   compatible:
     oneOf:
Documentation/devicetree/bindings/gpio/gpio-mxs.yaml +4 -0
index dfa1133f8c5e..bd0c4f329625 100644
@@ -34,6 +34,10 @@ properties:
 patternProperties:
   "gpio@[0-9]+$":
     type: object
+
+    allOf:
+      - $ref: gpio-common.yaml#
+
     properties:
       compatible:
         enum:
Documentation/devicetree/bindings/gpio/gpio-pca9570.yaml +3 -0
index 338c5312a106..69b12041c893 100644
@@ -9,6 +9,9 @@ title: PCA9570 I2C GPO expander
 maintainers:
   - Sungbo Eo <[email protected]>
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   compatible:
     enum:
Documentation/devicetree/bindings/gpio/gpio-rda.yaml +3 -0
index 6ece555f074f..d70c99f463c2 100644
@@ -9,6 +9,9 @@ title: RDA Micro GPIO controller
 maintainers:
   - Manivannan Sadhasivam <[email protected]>
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   compatible:
     const: rda,8810pl-gpio
Documentation/devicetree/bindings/gpio/gpio-vf610.yaml +3 -0
index 6ac5a78ad3da..82f3e4b407d1 100644
@@ -17,6 +17,9 @@ description: |
   Note: Each GPIO port should have an alias correctly numbered in "aliases"
   node.
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   compatible:
     enum:
Documentation/devicetree/bindings/gpio/mrvl-gpio.yaml +1 -0
index 4db3b8a3332c..e2b7d2d133a8 100644
@@ -12,6 +12,7 @@ maintainers:
   - Rob Herring <[email protected]>
 
 allOf:
+  - $ref: gpio-common.yaml#
   - if:
       properties:
         compatible:
Documentation/devicetree/bindings/gpio/qcom,wcd934x-gpio.yaml +3 -0
index 32a566ec3558..2eee374e8396 100644
@@ -13,6 +13,9 @@ description: |
   Qualcomm Technologies Inc WCD9340/WCD9341 Audio Codec has integrated
   gpio controller to control 5 gpios on the chip.
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   compatible:
     enum:
Documentation/devicetree/bindings/gpio/renesas,em-gio.yaml +3 -0
index 8bdef812c87c..845689807678 100644
@@ -9,6 +9,9 @@ title: Renesas EMMA Mobile General Purpose I/O Interface
 maintainers:
   - Magnus Damm <[email protected]>
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   compatible:
     const: renesas,em-gio
Documentation/devicetree/bindings/gpio/renesas,rcar-gpio.yaml +3 -0
index 5026662e4508..c116000d579f 100644
@@ -9,6 +9,9 @@ title: Renesas R-Car General-Purpose Input/Output Ports (GPIO)
 maintainers:
   - Geert Uytterhoeven <[email protected]>
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   compatible:
     oneOf:
Documentation/devicetree/bindings/gpio/sifive,gpio.yaml +3 -0
index a0efd8dc2538..f2d93b40fc7e 100644
@@ -10,6 +10,9 @@ maintainers:
   - Yash Shah <[email protected]>
   - Paul Walmsley <[email protected]>
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   compatible:
     items:
Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml +3 -0
index b391cc1b4590..459aafe5fd47 100644
@@ -49,6 +49,9 @@ properties:
 patternProperties:
   "^gpio-(port|controller)@[0-9a-f]+$":
     type: object
+    allOf:
+      - $ref: gpio-common.yaml#
+
     properties:
       compatible:
         const: snps,dw-apb-gpio-port
Documentation/devicetree/bindings/gpio/socionext,uniphier-gpio.yaml +3 -0
index c58ff9a94f45..94a911e9c313 100644
@@ -9,6 +9,9 @@ title: UniPhier GPIO controller
 maintainers:
   - Masahiro Yamada <[email protected]>
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   $nodename:
     pattern: "^gpio@[0-9a-f]+$"
Documentation/devicetree/bindings/gpio/xylon,logicvc-gpio.yaml +3 -0
index a36aec27069c..0e4581241b3f 100644
@@ -23,6 +23,9 @@ description: |
   - EN_VEE (power control) mapped to index 7
   - V_EN (power control) mapped to index 8
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   $nodename:
     pattern: "^gpio@[0-9a-f]+$"
Signature · 3 lines
Regards,

Laurent Pinchart
#10 lore raw

PATCH v2 3/13 dt-bindings: gpio: pl061: add missing properties and include common schema

In reply to Krzysztof Kozlowski

Describe all GPIO controller properties and include the common GPIO schema to be sure all common properties are properly validated.

---
 Documentation/devicetree/bindings/gpio/pl061-gpio.yaml | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/gpio/pl061-gpio.yaml +6 -0
index 313b17229247..6cbf10d8e120 100644
@@ -19,6 +19,9 @@ select:
   required:
     - compatible
 
+allOf:
+  - $ref: gpio-common.yaml#
+
 properties:
   $nodename:
     pattern: "^gpio@[0-9a-f]+$"
@@ -51,7 +54,10 @@ properties:
 
   gpio-controller: true
 
+  gpio-line-names: true
+
   gpio-ranges:
+    minItems: 1
     maxItems: 8
 
 required:
Signature · 7 lines
2.17.1


_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
#11 lore raw

PATCH v2 4/13 dt-bindings: gpio: fsl-imx-gpio: add i.MX ARMv6 and ARMv7 compatibles

In reply to Krzysztof Kozlowski

Several DTSes with ARMv6 and ARMv7 i.MX SoCs introduce their own compatibles so add them to fix dtbs_check warnings like:

arch/arm/boot/dts/imx35-pdk.dt.yaml: gpio@53fa4000:
compatible: ['fsl,imx35-gpio', 'fsl,imx31-gpio'] is not valid under any of the given schemas

arch/arm/boot/dts/imx51-babbage.dt.yaml: gpio@73f90000:
compatible: ['fsl,imx51-gpio', 'fsl,imx35-gpio'] is not valid under any of the given schemas

---
 .../devicetree/bindings/gpio/fsl-imx-gpio.yaml       | 12 ++++++++++++
 1 file changed, 12 insertions(+)
Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml +12 -0
index 737756e081fb..ad761e2f380a 100644
@@ -21,8 +21,20 @@ properties:
           - fsl,imx31-gpio
           - fsl,imx35-gpio
           - fsl,imx7d-gpio
+      - items:
+          - const: fsl,imx35-gpio
+          - const: fsl,imx31-gpio
       - items:
           - enum:
+              - fsl,imx50-gpio
+              - fsl,imx51-gpio
+              - fsl,imx53-gpio
+              - fsl,imx6q-gpio
+              - fsl,imx6sl-gpio
+              - fsl,imx6sll-gpio
+              - fsl,imx6sx-gpio
+              - fsl,imx6ul-gpio
+              - fsl,imx7d-gpio
               - fsl,imx8mm-gpio
               - fsl,imx8mn-gpio
               - fsl,imx8mp-gpio
Signature · 1 line
2.17.1
#12 lore raw

PATCH v2 5/13 dt-bindings: gpio: fsl-imx-gpio: add gpio-line-names

In reply to Krzysztof Kozlowski

Describe common "gpio-line-names" property to fix dtbs_check warnings like:

arch/arm/boot/dts/imx53-m53menlo.dt.yaml: gpio@53f84000:

    'gpio-line-names' does not match any of the regexes: '^(hog-[0-9]+|.+-hog(-[0-9]+)?)$', 'pinctrl-[0-9]+'
---
 Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml +1 -1
index ad761e2f380a..347f059d347a 100644
@@ -65,7 +65,7 @@ properties:
     const: 2
 
   gpio-controller: true
-
+  gpio-line-names: true
   gpio-ranges: true
 
   power-domains:
Signature · 7 lines
2.17.1


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
#13 lore raw

PATCH v2 6/13 dt-bindings: gpio: gpio-vf610: fix iMX 7ULP compatible matching

In reply to Krzysztof Kozlowski

The i.MX 7ULP DTSes use two compatibles so update the binding to fix dtbs_check warnings like:

arch/arm/boot/dts/imx7ulp-com.dt.yaml: gpio@40ae0000:

    compatible: ['fsl,imx7ulp-gpio', 'fsl,vf610-gpio'] is too long

arch/arm/boot/dts/imx7ulp-com.dt.yaml: gpio@40ae0000:
compatible: Additional items are not allowed ('fsl,vf610-gpio' was unexpected)

---

Changes since v1:
1. New patch

---
 Documentation/devicetree/bindings/gpio/gpio-vf610.yaml | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/gpio/gpio-vf610.yaml +5 -3
index 82f3e4b407d1..7a5745255969 100644
@@ -22,9 +22,11 @@ allOf:
 
 properties:
   compatible:
-    enum:
-      - fsl,vf610-gpio
-      - fsl,imx7ulp-gpio
+    oneOf:
+      - const: fsl,vf610-gpio
+      - items:
+          - const: fsl,imx7ulp-gpio
+          - const: fsl,vf610-gpio
 
   reg:
     description: The first reg tuple represents the PORT module, the second tuple
Signature · 7 lines
2.17.1


_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
#14 lore raw

PATCH v2 7/13 dt-bindings: media: include common schema in GPIO controllers

In reply to Krzysztof Kozlowski

Include the common GPIO schema in GPIO controllers to be sure all common properties are properly validated.

---

Changes since v1:
1. New patch

---
 Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml +3 -0
index 9ea827092fdd..3f72c37b99f7 100644
@@ -24,6 +24,9 @@ description: |
   serializer will output it on a local I2C bus. In the other direction all I2C
   traffic received over GMSL by the MAX9286 is output on the local I2C bus.
 
+allOf:
+  - $ref: /schemas/gpio/gpio-common.yaml#
+
 properties:
   '#address-cells':
     const: 1
Signature · 1 line
2.17.1
#15 lore raw

PATCH v2 8/13 dt-bindings: mfd: include common schema in GPIO controllers

In reply to Krzysztof Kozlowski

Include the common GPIO schema in GPIO controllers to be sure all common properties are properly validated.

---

Changes since v1:
1. New patch

---
 Documentation/devicetree/bindings/mfd/cirrus,madera.yaml     | 1 +
 Documentation/devicetree/bindings/mfd/max77650.yaml          | 3 +++
 Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml | 3 +++
 Documentation/devicetree/bindings/mfd/st,stmfx.yaml          | 2 ++
 Documentation/devicetree/bindings/mfd/wlf,arizona.yaml       | 1 +
 5 files changed, 10 insertions(+)
Documentation/devicetree/bindings/mfd/cirrus,madera.yaml +1 -0
index 499c62c04daa..76c78f96dbd2 100644
@@ -20,6 +20,7 @@ description: |
     bindings/sound/cirrus,madera.yaml
 
 allOf:
+  - $ref: /schemas/gpio/gpio-common.yaml#
   - $ref: /schemas/pinctrl/cirrus,madera.yaml#
   - $ref: /schemas/regulator/wlf,arizona.yaml#
   - $ref: /schemas/sound/cirrus,madera.yaml#
Documentation/devicetree/bindings/mfd/max77650.yaml +3 -0
index b0a0f0d3d9d4..382ce6363e5e 100644
@@ -20,6 +20,9 @@ description: |
   LEDs and onkey) refer to the binding documents under the respective
   sub-system directories.
 
+allOf:
+  - $ref: /schemas/gpio/gpio-common.yaml#
+
 properties:
   compatible:
     const: maxim,max77650
Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml +3 -0
index 3a6a1a26e2b3..3a59ec26075d 100644
@@ -15,6 +15,9 @@ description: |
   single-cell linear charger. Also included is a Coulomb counter, a real-time
   clock (RTC), and a 32.768 kHz clock gate.
 
+allOf:
+  - $ref: /schemas/gpio/gpio-common.yaml#
+
 properties:
   compatible:
     const: rohm,bd71828
Documentation/devicetree/bindings/mfd/st,stmfx.yaml +2 -0
index 888ab4b5df45..dc7168255c18 100644
@@ -31,6 +31,8 @@ properties:
 
   pinctrl:
     type: object
+    allOf:
+      - $ref: /schemas/gpio/gpio-common.yaml#
 
     properties:
       compatible:
Documentation/devicetree/bindings/mfd/wlf,arizona.yaml +1 -0
index 9e762d474218..a8610e304a00 100644
@@ -16,6 +16,7 @@ description: |
 allOf:
   - $ref: /schemas/sound/wlf,arizona.yaml#
   - $ref: /schemas/regulator/wlf,arizona.yaml#
+  - $ref: /schemas/gpio/gpio-common.yaml#
   - $ref: /schemas/extcon/wlf,arizona.yaml#
   - if:
       properties:
Signature · 7 lines
2.17.1


_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
#17 lore raw

PATCH v2 9/13 dt-bindings: pinctrl: include common schema in GPIO controllers

In reply to Krzysztof Kozlowski

Include the common GPIO schema in GPIO controllers to be sure all common properties are properly validated.

---

Changes since v1:
1. New patch

---
 .../devicetree/bindings/pinctrl/actions,s500-pinctrl.yaml      | 3 +++
 .../bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml          | 1 +
 .../devicetree/bindings/pinctrl/cirrus,lochnagar.yaml          | 3 +++
 Documentation/devicetree/bindings/pinctrl/ingenic,pinctrl.yaml | 3 +++
 .../devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml   | 3 +++
 Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml  | 3 +++
 .../devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml      | 3 +++
 .../devicetree/bindings/pinctrl/qcom,msm8226-pinctrl.yaml      | 3 +++
 .../devicetree/bindings/pinctrl/qcom,sm8250-pinctrl.yaml       | 3 +++
 .../devicetree/bindings/pinctrl/renesas,rza2-pinctrl.yaml      | 3 +++
 .../devicetree/bindings/pinctrl/st,stm32-pinctrl.yaml          | 3 +++
 11 files changed, 31 insertions(+)
Documentation/devicetree/bindings/pinctrl/actions,s500-pinctrl.yaml +3 -0
index 33391d30c00c..51bfc214bba6 100644
@@ -15,6 +15,9 @@ description: |
   GPIO function selection & GPIO attributes configuration. Please refer to
   pinctrl-bindings.txt in this directory for common binding part and usage.
 
+allOf:
+  - $ref: /schemas/gpio/gpio-common.yaml#
+
 properties:
   compatible:
     const: actions,s500-pinctrl
Documentation/devicetree/bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml +1 -0
index 7556be6e2754..55662f8d1f94 100644
@@ -143,6 +143,7 @@ allOf:
   # boards are defining it at the moment so it would generate a lot of
   # warnings.
 
+  - $ref: /schemas/gpio/gpio-common.yaml#
   - if:
       properties:
         compatible:
Documentation/devicetree/bindings/pinctrl/cirrus,lochnagar.yaml +3 -0
index 420d74856032..ed478b0ed4cc 100644
@@ -31,6 +31,9 @@ description: |
   This binding must be part of the Lochnagar MFD binding:
     [4] ../mfd/cirrus,lochnagar.yaml
 
+allOf:
+  - $ref: /schemas/gpio/gpio-common.yaml#
+
 properties:
   compatible:
     enum:
Documentation/devicetree/bindings/pinctrl/ingenic,pinctrl.yaml +3 -0
index 44c04d11ae4c..ffa64832b4f9 100644
@@ -59,6 +59,9 @@ properties:
 patternProperties:
   "^gpio@[0-9]$":
     type: object
+    allOf:
+      - $ref: /schemas/gpio/gpio-common.yaml#
+
     properties:
       compatible:
         enum:
Documentation/devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml +3 -0
index 152c151c27ad..7d0a4cb96f39 100644
@@ -14,6 +14,9 @@ description: |+
   required property:
   - compatible: "syscon"
 
+allOf:
+  - $ref: /schemas/gpio/gpio-common.yaml#
+
 properties:
   compatible:
     const: mediatek,mt6779-pinctrl
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml +3 -0
index 5556def6b99b..bc8bc0ac1926 100644
@@ -12,6 +12,9 @@ maintainers:
 description: |
   The Mediatek's Pin controller is used to control SoC pins.
 
+allOf:
+  - $ref: /schemas/gpio/gpio-common.yaml#
+
 properties:
   compatible:
     const: mediatek,mt8192-pinctrl
Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml +3 -0
index c64c93206817..22a6b80b4c0e 100644
@@ -13,6 +13,9 @@ description: |
   This binding describes the Top Level Mode Multiplexer block found in the
   IPQ6018 platform.
 
+allOf:
+  - $ref: /schemas/gpio/gpio-common.yaml#
+
 properties:
   compatible:
     const: qcom,ipq6018-pinctrl
Documentation/devicetree/bindings/pinctrl/qcom,msm8226-pinctrl.yaml +3 -0
index 1f0f5757f9e1..9855d859fe61 100644
@@ -13,6 +13,9 @@ description: |
   This binding describes the Top Level Mode Multiplexer block found in the
   MSM8226 platform.
 
+allOf:
+  - $ref: /schemas/gpio/gpio-common.yaml#
+
 properties:
   compatible:
     const: qcom,msm8226-pinctrl
Documentation/devicetree/bindings/pinctrl/qcom,sm8250-pinctrl.yaml +3 -0
index 8508c57522fd..e5757b6ced40 100644
@@ -13,6 +13,9 @@ description: |
   This binding describes the Top Level Mode Multiplexer block found in the
   SM8250 platform.
 
+allOf:
+  - $ref: /schemas/gpio/gpio-common.yaml#
+
 properties:
   compatible:
     const: qcom,sm8250-pinctrl
Documentation/devicetree/bindings/pinctrl/renesas,rza2-pinctrl.yaml +3 -0
index b7911a994f3a..4d7bf4340262 100644
@@ -10,6 +10,9 @@ maintainers:
   - Chris Brandt <[email protected]>
   - Geert Uytterhoeven <[email protected]>
 
+allOf:
+  - $ref: /schemas/gpio/gpio-common.yaml#
+
 description:
   The Renesas SoCs of the RZ/A2 series feature a combined Pin and GPIO
   controller.
Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.yaml +3 -0
index 72877544ca78..28b861362ba0 100644
@@ -56,6 +56,9 @@ properties:
 patternProperties:
   '^gpio@[0-9a-f]*$':
     type: object
+    allOf:
+      - $ref: /schemas/gpio/gpio-common.yaml#
+
     properties:
       gpio-controller: true
       '#gpio-cells':
Signature · 7 lines
2.17.1


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Acked-by on v2 9/13
#18 lore raw

Re: [PATCH v2 09/13] dt-bindings: pinctrl: include common schema in GPIO controllers

Hi,

Quoted 4 lines · Krzysztof Kozlowski

Include the common GPIO schema in GPIO controllers to be sure all common properties are properly validated.

Cheers,
-Paul

Quoted 203 lines

---

Changes since v1:
1. New patch

---
 .../devicetree/bindings/pinctrl/actions,s500-pinctrl.yaml      | 3 
+++
 .../bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml          | 1 +
 .../devicetree/bindings/pinctrl/cirrus,lochnagar.yaml          | 3 
+++
 Documentation/devicetree/bindings/pinctrl/ingenic,pinctrl.yaml | 3 
+++
 .../devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml   | 3 
+++
 Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml  | 3 
+++
 .../devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml      | 3 
+++
 .../devicetree/bindings/pinctrl/qcom,msm8226-pinctrl.yaml      | 3 
+++
 .../devicetree/bindings/pinctrl/qcom,sm8250-pinctrl.yaml       | 3 
+++
 .../devicetree/bindings/pinctrl/renesas,rza2-pinctrl.yaml      | 3 
+++
 .../devicetree/bindings/pinctrl/st,stm32-pinctrl.yaml          | 3 
+++
 11 files changed, 31 insertions(+)
Documentation/devicetree/bindings/pinctrl/actions,s500-pinctrl.yaml +0 -1
index 33391d30c00c..51bfc214bba6 100644
--- 

a/Documentation/devicetree/bindings/pinctrl/actions,s500-pinctrl.yaml
+++
b/Documentation/devicetree/bindings/pinctrl/actions,s500-pinctrl.yaml

Documentation/devicetree/bindings/pinctrl/actions,s500-pinctrl.yaml +0 -0
@@ -15,6 +15,9 @@ description: |
   GPIO function selection & GPIO attributes configuration. Please 

refer to
pinctrl-bindings.txt in this directory for common binding part and
usage.

Documentation/devicetree/bindings/pinctrl/actions,s500-pinctrl.yaml +3 -0
+allOf:
+  - $ref: /schemas/gpio/gpio-common.yaml#
+
 properties:
   compatible:
     const: actions,s500-pinctrl
Documentation/devicetree/bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml +0 -1
index 7556be6e2754..55662f8d1f94 100644
--- 

a/Documentation/devicetree/bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml
+++
b/Documentation/devicetree/bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml

Documentation/devicetree/bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml +0 -0
@@ -143,6 +143,7 @@ allOf:
   # boards are defining it at the moment so it would generate a lot 

of

   # warnings.
Documentation/devicetree/bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml +1 -0
+  - $ref: /schemas/gpio/gpio-common.yaml#
   - if:
       properties:
         compatible:
Documentation/devicetree/bindings/pinctrl/cirrus,lochnagar.yaml +3 -0
index 420d74856032..ed478b0ed4cc 100644
@@ -31,6 +31,9 @@ description: |
   This binding must be part of the Lochnagar MFD binding:
     [4] ../mfd/cirrus,lochnagar.yaml
 
+allOf:
+  - $ref: /schemas/gpio/gpio-common.yaml#
+
 properties:
   compatible:
     enum:
Documentation/devicetree/bindings/pinctrl/ingenic,pinctrl.yaml +3 -0
index 44c04d11ae4c..ffa64832b4f9 100644
@@ -59,6 +59,9 @@ properties:
 patternProperties:
   "^gpio@[0-9]$":
     type: object
+    allOf:
+      - $ref: /schemas/gpio/gpio-common.yaml#
+
     properties:
       compatible:
         enum:
Documentation/devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml +0 -1
index 152c151c27ad..7d0a4cb96f39 100644
--- 

a/Documentation/devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml
+++
b/Documentation/devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml

Documentation/devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml +3 -0
@@ -14,6 +14,9 @@ description: |+
   required property:
   - compatible: "syscon"
 
+allOf:
+  - $ref: /schemas/gpio/gpio-common.yaml#
+
 properties:
   compatible:
     const: mediatek,mt6779-pinctrl
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml +3 -0
index 5556def6b99b..bc8bc0ac1926 100644
@@ -12,6 +12,9 @@ maintainers:
 description: |
   The Mediatek's Pin controller is used to control SoC pins.
 
+allOf:
+  - $ref: /schemas/gpio/gpio-common.yaml#
+
 properties:
   compatible:
     const: mediatek,mt8192-pinctrl
Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml +0 -1
index c64c93206817..22a6b80b4c0e 100644
--- 

a/Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml
+++
b/Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml

Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml +0 -0
@@ -13,6 +13,9 @@ description: |
   This binding describes the Top Level Mode Multiplexer block found 

in the
IPQ6018 platform.

Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml +3 -0
+allOf:
+  - $ref: /schemas/gpio/gpio-common.yaml#
+
 properties:
   compatible:
     const: qcom,ipq6018-pinctrl
Documentation/devicetree/bindings/pinctrl/qcom,msm8226-pinctrl.yaml +0 -1
index 1f0f5757f9e1..9855d859fe61 100644
--- 

a/Documentation/devicetree/bindings/pinctrl/qcom,msm8226-pinctrl.yaml
+++
b/Documentation/devicetree/bindings/pinctrl/qcom,msm8226-pinctrl.yaml

Documentation/devicetree/bindings/pinctrl/qcom,msm8226-pinctrl.yaml +0 -0
@@ -13,6 +13,9 @@ description: |
   This binding describes the Top Level Mode Multiplexer block found 

in the
MSM8226 platform.

Documentation/devicetree/bindings/pinctrl/qcom,msm8226-pinctrl.yaml +3 -0
+allOf:
+  - $ref: /schemas/gpio/gpio-common.yaml#
+
 properties:
   compatible:
     const: qcom,msm8226-pinctrl
Documentation/devicetree/bindings/pinctrl/qcom,sm8250-pinctrl.yaml +0 -1
index 8508c57522fd..e5757b6ced40 100644
--- 

a/Documentation/devicetree/bindings/pinctrl/qcom,sm8250-pinctrl.yaml
+++
b/Documentation/devicetree/bindings/pinctrl/qcom,sm8250-pinctrl.yaml

Documentation/devicetree/bindings/pinctrl/qcom,sm8250-pinctrl.yaml +0 -0
@@ -13,6 +13,9 @@ description: |
   This binding describes the Top Level Mode Multiplexer block found 

in the
SM8250 platform.

Documentation/devicetree/bindings/pinctrl/qcom,sm8250-pinctrl.yaml +3 -0
+allOf:
+  - $ref: /schemas/gpio/gpio-common.yaml#
+
 properties:
   compatible:
     const: qcom,sm8250-pinctrl
Documentation/devicetree/bindings/pinctrl/renesas,rza2-pinctrl.yaml +0 -1
index b7911a994f3a..4d7bf4340262 100644
--- 

a/Documentation/devicetree/bindings/pinctrl/renesas,rza2-pinctrl.yaml
+++
b/Documentation/devicetree/bindings/pinctrl/renesas,rza2-pinctrl.yaml

Documentation/devicetree/bindings/pinctrl/renesas,rza2-pinctrl.yaml +3 -0
@@ -10,6 +10,9 @@ maintainers:
   - Chris Brandt <[email protected]>
   - Geert Uytterhoeven <[email protected]>
 
+allOf:
+  - $ref: /schemas/gpio/gpio-common.yaml#
+
 description:
   The Renesas SoCs of the RZ/A2 series feature a combined Pin and 

GPIO
controller.

Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.yaml +3 -1
index 72877544ca78..28b861362ba0 100644
@@ -56,6 +56,9 @@ properties:
 patternProperties:
   '^gpio@[0-9a-f]*$':
     type: object
+    allOf:
+      - $ref: /schemas/gpio/gpio-common.yaml#
+
     properties:
       gpio-controller: true
       '#gpio-cells':
--
Quoted 2 lines

2.17.1

_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek

#19 lore raw

Re: [PATCH v2 09/13] dt-bindings: pinctrl: include common schema in GPIO controllers

In reply to Krzysztof Kozlowski

Hi Krzysztof,

Thank you for the patch.

Quoted 2 lines · Krzysztof Kozlowski

Include the common GPIO schema in GPIO controllers to be sure all common properties are properly validated.

Shouldn't we delete the properties that are now redundant from these schemas ?

Quoted 172 lines

---

Changes since v1:
1. New patch

---
 .../devicetree/bindings/pinctrl/actions,s500-pinctrl.yaml      | 3 +++
 .../bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml          | 1 +
 .../devicetree/bindings/pinctrl/cirrus,lochnagar.yaml          | 3 +++
 Documentation/devicetree/bindings/pinctrl/ingenic,pinctrl.yaml | 3 +++
 .../devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml   | 3 +++
 Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml  | 3 +++
 .../devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml      | 3 +++
 .../devicetree/bindings/pinctrl/qcom,msm8226-pinctrl.yaml      | 3 +++
 .../devicetree/bindings/pinctrl/qcom,sm8250-pinctrl.yaml       | 3 +++
 .../devicetree/bindings/pinctrl/renesas,rza2-pinctrl.yaml      | 3 +++
 .../devicetree/bindings/pinctrl/st,stm32-pinctrl.yaml          | 3 +++
 11 files changed, 31 insertions(+)
Documentation/devicetree/bindings/pinctrl/actions,s500-pinctrl.yaml +3 -0
index 33391d30c00c..51bfc214bba6 100644
@@ -15,6 +15,9 @@ description: |
   GPIO function selection & GPIO attributes configuration. Please refer to
   pinctrl-bindings.txt in this directory for common binding part and usage.
 
+allOf:
+  - $ref: /schemas/gpio/gpio-common.yaml#
+
 properties:
   compatible:
     const: actions,s500-pinctrl
Documentation/devicetree/bindings/pinctrl/allwinner,sun4i-a10-pinctrl.yaml +1 -0
index 7556be6e2754..55662f8d1f94 100644
@@ -143,6 +143,7 @@ allOf:
   # boards are defining it at the moment so it would generate a lot of
   # warnings.
 
+  - $ref: /schemas/gpio/gpio-common.yaml#
   - if:
       properties:
         compatible:
Documentation/devicetree/bindings/pinctrl/cirrus,lochnagar.yaml +3 -0
index 420d74856032..ed478b0ed4cc 100644
@@ -31,6 +31,9 @@ description: |
   This binding must be part of the Lochnagar MFD binding:
     [4] ../mfd/cirrus,lochnagar.yaml
 
+allOf:
+  - $ref: /schemas/gpio/gpio-common.yaml#
+
 properties:
   compatible:
     enum:
Documentation/devicetree/bindings/pinctrl/ingenic,pinctrl.yaml +3 -0
index 44c04d11ae4c..ffa64832b4f9 100644
@@ -59,6 +59,9 @@ properties:
 patternProperties:
   "^gpio@[0-9]$":
     type: object
+    allOf:
+      - $ref: /schemas/gpio/gpio-common.yaml#
+
     properties:
       compatible:
         enum:
Documentation/devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml +3 -0
index 152c151c27ad..7d0a4cb96f39 100644
@@ -14,6 +14,9 @@ description: |+
   required property:
   - compatible: "syscon"
 
+allOf:
+  - $ref: /schemas/gpio/gpio-common.yaml#
+
 properties:
   compatible:
     const: mediatek,mt6779-pinctrl
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8192.yaml +3 -0
index 5556def6b99b..bc8bc0ac1926 100644
@@ -12,6 +12,9 @@ maintainers:
 description: |
   The Mediatek's Pin controller is used to control SoC pins.
 
+allOf:
+  - $ref: /schemas/gpio/gpio-common.yaml#
+
 properties:
   compatible:
     const: mediatek,mt8192-pinctrl
Documentation/devicetree/bindings/pinctrl/qcom,ipq6018-pinctrl.yaml +3 -0
index c64c93206817..22a6b80b4c0e 100644
@@ -13,6 +13,9 @@ description: |
   This binding describes the Top Level Mode Multiplexer block found in the
   IPQ6018 platform.
 
+allOf:
+  - $ref: /schemas/gpio/gpio-common.yaml#
+
 properties:
   compatible:
     const: qcom,ipq6018-pinctrl
Documentation/devicetree/bindings/pinctrl/qcom,msm8226-pinctrl.yaml +3 -0
index 1f0f5757f9e1..9855d859fe61 100644
@@ -13,6 +13,9 @@ description: |
   This binding describes the Top Level Mode Multiplexer block found in the
   MSM8226 platform.
 
+allOf:
+  - $ref: /schemas/gpio/gpio-common.yaml#
+
 properties:
   compatible:
     const: qcom,msm8226-pinctrl
Documentation/devicetree/bindings/pinctrl/qcom,sm8250-pinctrl.yaml +3 -0
index 8508c57522fd..e5757b6ced40 100644
@@ -13,6 +13,9 @@ description: |
   This binding describes the Top Level Mode Multiplexer block found in the
   SM8250 platform.
 
+allOf:
+  - $ref: /schemas/gpio/gpio-common.yaml#
+
 properties:
   compatible:
     const: qcom,sm8250-pinctrl
Documentation/devicetree/bindings/pinctrl/renesas,rza2-pinctrl.yaml +3 -0
index b7911a994f3a..4d7bf4340262 100644
@@ -10,6 +10,9 @@ maintainers:
   - Chris Brandt <[email protected]>
   - Geert Uytterhoeven <[email protected]>
 
+allOf:
+  - $ref: /schemas/gpio/gpio-common.yaml#
+
 description:
   The Renesas SoCs of the RZ/A2 series feature a combined Pin and GPIO
   controller.
Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.yaml +3 -0
index 72877544ca78..28b861362ba0 100644
@@ -56,6 +56,9 @@ properties:
 patternProperties:
   '^gpio@[0-9a-f]*$':
     type: object
+    allOf:
+      - $ref: /schemas/gpio/gpio-common.yaml#
+
     properties:
       gpio-controller: true
       '#gpio-cells':
Signature · 3 lines
Regards,

Laurent Pinchart
#20 lore raw

Re: [PATCH v2 09/13] dt-bindings: pinctrl: include common schema in GPIO controllers

Quoted 11 lines · Laurent Pinchart

Hi Krzysztof,

Thank you for the patch.

Quoted 2 lines · Krzysztof Kozlowski

Include the common GPIO schema in GPIO controllers to be sure all common properties are properly validated.

Shouldn't we delete the properties that are now redundant from these schemas ?

Good point. However not with "additionalPropeties: false". Schema requires all properties to be mentioned. I would need to use "unevaluatedProperties: false" in each file.

What is preferred?

Best regards,
Krzysztof

#21 lore raw

Re: [PATCH v2 09/13] dt-bindings: pinctrl: include common schema in GPIO controllers

Hi Krzysztof,

Quoted 5 lines · Krzysztof Kozlowski
Quoted 4 lines · Laurent Pinchart
Quoted 2 lines · Krzysztof Kozlowski

Include the common GPIO schema in GPIO controllers to be sure all common properties are properly validated.

Quoted 8 lines
Quoted 2 lines

Shouldn't we delete the properties that are now redundant from these schemas ?

Good point. However not with "additionalPropeties: false". Schema requires all properties to be mentioned. I would need to use "unevaluatedProperties: false" in each file.

What is preferred?

I've seen Rob advocating for unevaluatedProperties multiple times, but I'll let him comment on this, I don't want to speak for him.

Signature · 3 lines
Regards,

Laurent Pinchart
#23 lore raw

PATCH v2 10/13 ASoC: dt-bindings: zl38060: include common schema in GPIO controllers

In reply to Krzysztof Kozlowski

Include the common GPIO schema in GPIO controllers to be sure all common properties are properly validated.

---

Changes since v1:
1. New patch

---
 Documentation/devicetree/bindings/sound/zl38060.yaml | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/sound/zl38060.yaml +3 -0
index 338e2a13c775..0e3d8c854806 100644
@@ -15,6 +15,9 @@ maintainers:
   - Jaroslav Kysela <[email protected]>
   - Takashi Iwai <[email protected]>
 
+allOf:
+  - $ref: /schemas/gpio/gpio-common.yaml#
+
 properties:
   compatible:
     const: mscc,zl38060
Signature · 7 lines
2.17.1


_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
maintainer Acked-by on v2 10/13
#24 lore raw

Re: [PATCH v2 10/13] ASoC: dt-bindings: zl38060: include common schema in GPIO controllers

Quoted 2 lines · Krzysztof Kozlowski

Include the common GPIO schema in GPIO controllers to be sure all common properties are properly validated.

_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek

#25 lore raw

PATCH v2 11/13 arm64: dts: imx8mq-librem5: correct GPIO hog property

In reply to Krzysztof Kozlowski

Correct the name of property for GPIO specifier in GPIO hog.

---
 arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi +1 -1
index 56295dd2fa8f..e4dedcb58f76 100644
@@ -251,7 +251,7 @@
 
 	pmic-5v {
 		gpio-hog;
-		gpio = <&gpio1 1 GPIO_ACTIVE_HIGH>;
+		gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
 		input;
 	};
 };
Signature · 7 lines
2.17.1


_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
#26 lore raw

PATCH v2 12/13 arm64: dts: imx8mq-librem5: align GPIO hog names with dtschema

In reply to Krzysztof Kozlowski

dtschema expects GPIO hogs to end with 'hog' suffix.

---
 arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi +1 -1
index e4dedcb58f76..6cbcee2fb938 100644
@@ -249,7 +249,7 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_pmic_5v>;
 
-	pmic-5v {
+	pmic-5v-hog {
 		gpio-hog;
 		gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
 		input;
Signature · 7 lines
2.17.1


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
#27 lore raw

PATCH v2 13/13 ARM: dts: imx: align GPIO hog names with dtschema

In reply to Krzysztof Kozlowski

dtschema for GPIO controllers expects GPIO hogs to end with 'hog' suffix.

---
 arch/arm/boot/dts/imx51-zii-rdu1.dts        | 2 +-
 arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi     | 8 ++++----
 arch/arm/boot/dts/imx6ul-ccimx6ulsbcpro.dts | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)
arch/arm/boot/dts/imx51-zii-rdu1.dts +1 -1
index e559ab0c3645..ec8ca3ac2c1c 100644
@@ -451,7 +451,7 @@
 			  "", "", "", "",
 			  "", "", "", "";
 
-	unused-sd3-wp-gpio {
+	unused-sd3-wp-hog {
 		/*
 		 * See pinctrl_esdhc1 below for more details on this
 		 */
arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi +4 -4
index 66b15748e287..c0a76202e16b 100644
@@ -330,28 +330,28 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gpio3_hog>;
 
-	usb-emulation {
+	usb-emulation-hog {
 		gpio-hog;
 		gpios = <19 GPIO_ACTIVE_HIGH>;
 		output-low;
 		line-name = "usb-emulation";
 	};
 
-	usb-mode1 {
+	usb-mode1-hog {
 		gpio-hog;
 		gpios = <20 GPIO_ACTIVE_HIGH>;
 		output-high;
 		line-name = "usb-mode1";
 	};
 
-	usb-pwr {
+	usb-pwr-hog {
 		gpio-hog;
 		gpios = <22 GPIO_ACTIVE_LOW>;
 		output-high;
 		line-name = "usb-pwr-ctrl-en-n";
 	};
 
-	usb-mode2 {
+	usb-mode2-hog {
 		gpio-hog;
 		gpios = <23 GPIO_ACTIVE_HIGH>;
 		output-high;
arch/arm/boot/dts/imx6ul-ccimx6ulsbcpro.dts +1 -1
index a0bbec57ddc7..3ec042bfccba 100644
@@ -110,7 +110,7 @@
 };
 
 &gpio5 {
-	emmc-usd-mux {
+	emmc-usd-mux-hog {
 		gpio-hog;
 		gpios = <1 GPIO_ACTIVE_LOW>;
 		output-high;
Signature · 7 lines
2.17.1


_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv