All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] dt-bindings: gpio: gpio-vf610: Add parsing of hogs
@ 2023-06-09 12:10 Alexander Stein
  2023-06-09 12:15 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander Stein @ 2023-06-09 12:10 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Andy Shevchenko, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Alexander Stein, linux-gpio, devicetree

Allow parsing GPIO controller children nodes with GPIO hogs.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
This implements the same as commit dfb49cc231a48 ("dt-bindings: gpio:
fsl-imx-gpio: Add parsing of hogs") and reuses the commit message as
well.

 .../devicetree/bindings/gpio/gpio-vf610.yaml    | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml b/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml
index d2c39dba56add..41b4bb1bca11d 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml
+++ b/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml
@@ -61,6 +61,23 @@ properties:
   gpio-ranges:
     maxItems: 1
 
+patternProperties:
+  "^(hog-[0-9]+|.+-hog(-[0-9]+)?)$":
+    type: object
+    properties:
+      gpio-hog: true
+      gpios: true
+      input: true
+      output-high: true
+      output-low: true
+      line-name: true
+
+    required:
+      - gpio-hog
+      - gpios
+
+    additionalProperties: false
+
 required:
   - compatible
   - reg
-- 
2.34.1


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

* Re: [PATCH 1/1] dt-bindings: gpio: gpio-vf610: Add parsing of hogs
  2023-06-09 12:10 [PATCH 1/1] dt-bindings: gpio: gpio-vf610: Add parsing of hogs Alexander Stein
@ 2023-06-09 12:15 ` Krzysztof Kozlowski
  2023-06-09 12:27   ` Alexander Stein
  0 siblings, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2023-06-09 12:15 UTC (permalink / raw)
  To: Alexander Stein, Linus Walleij, Bartosz Golaszewski,
	Andy Shevchenko, Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-gpio, devicetree

On 09/06/2023 14:10, Alexander Stein wrote:
> Allow parsing GPIO controller children nodes with GPIO hogs.
> 
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> ---
> This implements the same as commit dfb49cc231a48 ("dt-bindings: gpio:
> fsl-imx-gpio: Add parsing of hogs") and reuses the commit message as
> well.
> 

But it was suboptimal. Do it like in commit 6c19974d1e83 ("dt-bindings:
gpio: Convert STMPE GPIO to YAML schema"), including also narrower pattern.

Best regards,
Krzysztof


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

* Re: [PATCH 1/1] dt-bindings: gpio: gpio-vf610: Add parsing of hogs
  2023-06-09 12:15 ` Krzysztof Kozlowski
@ 2023-06-09 12:27   ` Alexander Stein
  2023-06-09 13:12     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander Stein @ 2023-06-09 12:27 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Andy Shevchenko, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Krzysztof Kozlowski
  Cc: linux-gpio, devicetree

Am Freitag, 9. Juni 2023, 14:15:53 CEST schrieb Krzysztof Kozlowski:
> On 09/06/2023 14:10, Alexander Stein wrote:
> > Allow parsing GPIO controller children nodes with GPIO hogs.
> > 
> > Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> > ---
> > This implements the same as commit dfb49cc231a48 ("dt-bindings: gpio:
> > fsl-imx-gpio: Add parsing of hogs") and reuses the commit message as
> > well.
> 
> But it was suboptimal. Do it like in commit 6c19974d1e83 ("dt-bindings:
> gpio: Convert STMPE GPIO to YAML schema"), including also narrower pattern.

Ah, thanks. I wasn't aware it is part of generic dt-schema.
Regarding the narrower pattern: dt-schema still uses the wider one. Is this 
still correct or something which needs to be fixed?

Best regards,
Alexander

> Best regards,
> Krzysztof


-- 
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/



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

* Re: [PATCH 1/1] dt-bindings: gpio: gpio-vf610: Add parsing of hogs
  2023-06-09 12:27   ` Alexander Stein
@ 2023-06-09 13:12     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2023-06-09 13:12 UTC (permalink / raw)
  To: Alexander Stein, Linus Walleij, Bartosz Golaszewski,
	Andy Shevchenko, Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-gpio, devicetree

On 09/06/2023 14:27, Alexander Stein wrote:
> Am Freitag, 9. Juni 2023, 14:15:53 CEST schrieb Krzysztof Kozlowski:
>> On 09/06/2023 14:10, Alexander Stein wrote:
>>> Allow parsing GPIO controller children nodes with GPIO hogs.
>>>
>>> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
>>> ---
>>> This implements the same as commit dfb49cc231a48 ("dt-bindings: gpio:
>>> fsl-imx-gpio: Add parsing of hogs") and reuses the commit message as
>>> well.
>>
>> But it was suboptimal. Do it like in commit 6c19974d1e83 ("dt-bindings:
>> gpio: Convert STMPE GPIO to YAML schema"), including also narrower pattern.
> 
> Ah, thanks. I wasn't aware it is part of generic dt-schema.
> Regarding the narrower pattern: dt-schema still uses the wider one. Is this 
> still correct or something which needs to be fixed?

dtschema must have wider pattern as it covers everything, all boards.

If existing DTS fits narrower pattern, make it narrower. It helps
keeping code consistent thus easier to read.

Best regards,
Krzysztof


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

end of thread, other threads:[~2023-06-09 13:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-09 12:10 [PATCH 1/1] dt-bindings: gpio: gpio-vf610: Add parsing of hogs Alexander Stein
2023-06-09 12:15 ` Krzysztof Kozlowski
2023-06-09 12:27   ` Alexander Stein
2023-06-09 13:12     ` Krzysztof Kozlowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.