linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: gpio: snps,dw-apb: allow gpio-line-names
@ 2023-07-12  7:45 Krzysztof Kozlowski
  2023-07-12  9:53 ` Serge Semin
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2023-07-12  7:45 UTC (permalink / raw)
  To: Hoan Tran, Serge Semin, Linus Walleij, Bartosz Golaszewski,
	Andy Shevchenko, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	linux-gpio, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

Allow the GPIO controller subnode to define GPIO names.  Already used in
at least on DTS:

  bitmain/bm1880-sophon-edge.dtb: gpio@50027000: gpio-controller@0: 'gpio-line-names' does not match any of the regexes: 'pinctrl-[0-9]+'

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml b/Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml
index b391cc1b4590..209f03bba0a7 100644
--- a/Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml
+++ b/Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml
@@ -61,6 +61,10 @@ patternProperties:
       '#gpio-cells':
         const: 2
 
+      gpio-line-names:
+        minItems: 1
+        maxItems: 32
+
       ngpios:
         default: 32
         minimum: 1
-- 
2.34.1


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

* Re: [PATCH] dt-bindings: gpio: snps,dw-apb: allow gpio-line-names
  2023-07-12  7:45 [PATCH] dt-bindings: gpio: snps,dw-apb: allow gpio-line-names Krzysztof Kozlowski
@ 2023-07-12  9:53 ` Serge Semin
  2023-07-12 15:28   ` Andy Shevchenko
  2023-07-14 16:10 ` Rob Herring
  2023-07-20 15:20 ` Bartosz Golaszewski
  2 siblings, 1 reply; 7+ messages in thread
From: Serge Semin @ 2023-07-12  9:53 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Hoan Tran, Linus Walleij, Bartosz Golaszewski, Andy Shevchenko,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-gpio,
	devicetree, linux-kernel

On Wed, Jul 12, 2023 at 09:45:53AM +0200, Krzysztof Kozlowski wrote:
> Allow the GPIO controller subnode to define GPIO names.  Already used in
> at least on DTS:

s/on/one

> 
>   bitmain/bm1880-sophon-edge.dtb: gpio@50027000: gpio-controller@0: 'gpio-line-names' does not match any of the regexes: 'pinctrl-[0-9]+'

Acked-by: Serge Semin <fancer.lancer@gmail.com>

-Serge(y)

> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml b/Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml
> index b391cc1b4590..209f03bba0a7 100644
> --- a/Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml
> +++ b/Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml
> @@ -61,6 +61,10 @@ patternProperties:
>        '#gpio-cells':
>          const: 2
>  
> +      gpio-line-names:
> +        minItems: 1
> +        maxItems: 32
> +
>        ngpios:
>          default: 32
>          minimum: 1
> -- 
> 2.34.1
> 

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

* Re: [PATCH] dt-bindings: gpio: snps,dw-apb: allow gpio-line-names
  2023-07-12  9:53 ` Serge Semin
@ 2023-07-12 15:28   ` Andy Shevchenko
  2023-07-12 15:50     ` Serge Semin
  2023-07-12 17:47     ` Krzysztof Kozlowski
  0 siblings, 2 replies; 7+ messages in thread
From: Andy Shevchenko @ 2023-07-12 15:28 UTC (permalink / raw)
  To: Serge Semin
  Cc: Krzysztof Kozlowski, Hoan Tran, Linus Walleij,
	Bartosz Golaszewski, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-gpio, devicetree, linux-kernel

On Wed, Jul 12, 2023 at 12:53:00PM +0300, Serge Semin wrote:
> On Wed, Jul 12, 2023 at 09:45:53AM +0200, Krzysztof Kozlowski wrote:
> > Allow the GPIO controller subnode to define GPIO names.

Are we going to do this for each GPIO controller bindings? Can it be done once
for all please?

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH] dt-bindings: gpio: snps,dw-apb: allow gpio-line-names
  2023-07-12 15:28   ` Andy Shevchenko
@ 2023-07-12 15:50     ` Serge Semin
  2023-07-12 17:47     ` Krzysztof Kozlowski
  1 sibling, 0 replies; 7+ messages in thread
From: Serge Semin @ 2023-07-12 15:50 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Krzysztof Kozlowski, Hoan Tran, Linus Walleij,
	Bartosz Golaszewski, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-gpio, devicetree, linux-kernel

On Wed, Jul 12, 2023 at 06:28:40PM +0300, Andy Shevchenko wrote:
> On Wed, Jul 12, 2023 at 12:53:00PM +0300, Serge Semin wrote:
> > On Wed, Jul 12, 2023 at 09:45:53AM +0200, Krzysztof Kozlowski wrote:
> > > Allow the GPIO controller subnode to define GPIO names.
> 
> Are we going to do this for each GPIO controller bindings? Can it be done once
> for all please?

AFAIU the DT-binding schemas which have "unevaluatedProperties: false"
property specified won't have such problem since any DT property with
"*-names" is already evaluated by the dt-validate core. Meanwhile in
this case the schema has "additionalProperties: false" property which
prohibits any none-explicitly defined property in the node.

Regarding the "gpio-line-names" DT-property constraints. Alas it can't
be done generically because at least a number of items is device
specific.

-Serge(y)

> 
> -- 
> With Best Regards,
> Andy Shevchenko
> 
> 

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

* Re: [PATCH] dt-bindings: gpio: snps,dw-apb: allow gpio-line-names
  2023-07-12 15:28   ` Andy Shevchenko
  2023-07-12 15:50     ` Serge Semin
@ 2023-07-12 17:47     ` Krzysztof Kozlowski
  1 sibling, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2023-07-12 17:47 UTC (permalink / raw)
  To: Andy Shevchenko, Serge Semin
  Cc: Hoan Tran, Linus Walleij, Bartosz Golaszewski, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-gpio, devicetree,
	linux-kernel

On 12/07/2023 17:28, Andy Shevchenko wrote:
> On Wed, Jul 12, 2023 at 12:53:00PM +0300, Serge Semin wrote:
>> On Wed, Jul 12, 2023 at 09:45:53AM +0200, Krzysztof Kozlowski wrote:
>>> Allow the GPIO controller subnode to define GPIO names.
> 
> Are we going to do this for each GPIO controller bindings? Can it be done once
> for all please?

No, because sizes differ. Although here the size is anyway flexible, so
not much benefit of it, but in other GPIO controllers it is not flexible.

Best regards,
Krzysztof


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

* Re: [PATCH] dt-bindings: gpio: snps,dw-apb: allow gpio-line-names
  2023-07-12  7:45 [PATCH] dt-bindings: gpio: snps,dw-apb: allow gpio-line-names Krzysztof Kozlowski
  2023-07-12  9:53 ` Serge Semin
@ 2023-07-14 16:10 ` Rob Herring
  2023-07-20 15:20 ` Bartosz Golaszewski
  2 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2023-07-14 16:10 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: devicetree, linux-kernel, Hoan Tran, Andy Shevchenko,
	Bartosz Golaszewski, Serge Semin, linux-gpio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Linus Walleij


On Wed, 12 Jul 2023 09:45:53 +0200, Krzysztof Kozlowski wrote:
> Allow the GPIO controller subnode to define GPIO names.  Already used in
> at least on DTS:
> 
>   bitmain/bm1880-sophon-edge.dtb: gpio@50027000: gpio-controller@0: 'gpio-line-names' does not match any of the regexes: 'pinctrl-[0-9]+'
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml | 4 ++++
>  1 file changed, 4 insertions(+)
> 

Acked-by: Rob Herring <robh@kernel.org>


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

* Re: [PATCH] dt-bindings: gpio: snps,dw-apb: allow gpio-line-names
  2023-07-12  7:45 [PATCH] dt-bindings: gpio: snps,dw-apb: allow gpio-line-names Krzysztof Kozlowski
  2023-07-12  9:53 ` Serge Semin
  2023-07-14 16:10 ` Rob Herring
@ 2023-07-20 15:20 ` Bartosz Golaszewski
  2 siblings, 0 replies; 7+ messages in thread
From: Bartosz Golaszewski @ 2023-07-20 15:20 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Hoan Tran, Serge Semin, Linus Walleij, Andy Shevchenko,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-gpio,
	devicetree, linux-kernel

On Wed, Jul 12, 2023 at 9:45 AM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> Allow the GPIO controller subnode to define GPIO names.  Already used in
> at least on DTS:
>
>   bitmain/bm1880-sophon-edge.dtb: gpio@50027000: gpio-controller@0: 'gpio-line-names' does not match any of the regexes: 'pinctrl-[0-9]+'
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml b/Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml
> index b391cc1b4590..209f03bba0a7 100644
> --- a/Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml
> +++ b/Documentation/devicetree/bindings/gpio/snps,dw-apb-gpio.yaml
> @@ -61,6 +61,10 @@ patternProperties:
>        '#gpio-cells':
>          const: 2
>
> +      gpio-line-names:
> +        minItems: 1
> +        maxItems: 32
> +
>        ngpios:
>          default: 32
>          minimum: 1
> --
> 2.34.1
>

Applied, thanks!

Bart

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

end of thread, other threads:[~2023-07-20 15:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-12  7:45 [PATCH] dt-bindings: gpio: snps,dw-apb: allow gpio-line-names Krzysztof Kozlowski
2023-07-12  9:53 ` Serge Semin
2023-07-12 15:28   ` Andy Shevchenko
2023-07-12 15:50     ` Serge Semin
2023-07-12 17:47     ` Krzysztof Kozlowski
2023-07-14 16:10 ` Rob Herring
2023-07-20 15:20 ` Bartosz Golaszewski

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).