2022-08-25 15:04:57

by Conor Dooley

[permalink] [raw]
Subject: [PATCH v2] dt-bindings: gpio: mpfs-gpio: allow parsing of hog child nodes.

The SD card and eMMC on PolarFire SoC are sometimes muxed using a GPIO
by the bootloader. Add a hog child property to facilitate this.

Signed-off-by: Conor Dooley <[email protected]>
---
Changes since v1:
- move addtionalProperties up under type:
- drop the explicit match group syntax
---
.../bindings/gpio/microchip,mpfs-gpio.yaml | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)

diff --git a/Documentation/devicetree/bindings/gpio/microchip,mpfs-gpio.yaml b/Documentation/devicetree/bindings/gpio/microchip,mpfs-gpio.yaml
index 110651eafa70..fdc16822fd4b 100644
--- a/Documentation/devicetree/bindings/gpio/microchip,mpfs-gpio.yaml
+++ b/Documentation/devicetree/bindings/gpio/microchip,mpfs-gpio.yaml
@@ -44,6 +44,24 @@ properties:

gpio-controller: true

+patternProperties:
+ "^.+-hog(-[0-9]+)?$":
+ type: object
+
+ additionalProperties: false
+
+ properties:
+ gpio-hog: true
+ gpios: true
+ input: true
+ output-high: true
+ output-low: true
+ line-name: true
+
+ required:
+ - gpio-hog
+ - gpios
+
required:
- compatible
- reg
--
2.36.1


2022-08-31 13:31:24

by Bartosz Golaszewski

[permalink] [raw]
Subject: Re: [PATCH v2] dt-bindings: gpio: mpfs-gpio: allow parsing of hog child nodes.

On Thu, Aug 25, 2022 at 4:36 PM Conor Dooley <[email protected]> wrote:
>
> The SD card and eMMC on PolarFire SoC are sometimes muxed using a GPIO
> by the bootloader. Add a hog child property to facilitate this.
>
> Signed-off-by: Conor Dooley <[email protected]>
> ---
> Changes since v1:
> - move addtionalProperties up under type:
> - drop the explicit match group syntax
> ---
> .../bindings/gpio/microchip,mpfs-gpio.yaml | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/gpio/microchip,mpfs-gpio.yaml b/Documentation/devicetree/bindings/gpio/microchip,mpfs-gpio.yaml
> index 110651eafa70..fdc16822fd4b 100644
> --- a/Documentation/devicetree/bindings/gpio/microchip,mpfs-gpio.yaml
> +++ b/Documentation/devicetree/bindings/gpio/microchip,mpfs-gpio.yaml
> @@ -44,6 +44,24 @@ properties:
>
> gpio-controller: true
>
> +patternProperties:
> + "^.+-hog(-[0-9]+)?$":
> + type: object
> +
> + additionalProperties: false
> +
> + properties:
> + gpio-hog: true
> + gpios: true
> + input: true
> + output-high: true
> + output-low: true
> + line-name: true
> +
> + required:
> + - gpio-hog
> + - gpios
> +
> required:
> - compatible
> - reg
> --
> 2.36.1
>

Applied, thanks!

Bart