linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] dt-bindings: pinctrl: cy8x95x0: Minor fix & update
@ 2024-01-30 12:08 Naresh Solanki
  2024-01-30 12:19 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 5+ messages in thread
From: Naresh Solanki @ 2024-01-30 12:08 UTC (permalink / raw)
  To: Linus Walleij, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Patrick Rudolph
  Cc: mazziesaccount, Naresh Solanki, linux-gpio, devicetree, linux-kernel

Update maxItems to 60 for gpio-reserved-ranges to allow multiple gpio
reserved ranges.
Add input-enable property to allow configuring a pin as input.
Rearrange allOf
Update example.

Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com>
---
 .../bindings/pinctrl/cypress,cy8c95x0.yaml    | 28 +++++++++++++++----
 1 file changed, 23 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/cypress,cy8c95x0.yaml b/Documentation/devicetree/bindings/pinctrl/cypress,cy8c95x0.yaml
index 7f30ec2f1e54..89ce0cb68834 100644
--- a/Documentation/devicetree/bindings/pinctrl/cypress,cy8c95x0.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/cypress,cy8c95x0.yaml
@@ -45,7 +45,8 @@ properties:
     maxItems: 1
 
   gpio-reserved-ranges:
-    maxItems: 1
+    minItems: 1
+    maxItems: 60
 
   vdd-supply:
     description:
@@ -85,6 +86,8 @@ patternProperties:
 
       bias-disable: true
 
+      input-enable: true
+
       output-high: true
 
       output-low: true
@@ -101,6 +104,9 @@ patternProperties:
 
     additionalProperties: false
 
+allOf:
+  - $ref: pinctrl.yaml#
+
 required:
   - compatible
   - reg
@@ -112,9 +118,6 @@ required:
 
 additionalProperties: false
 
-allOf:
-  - $ref: pinctrl.yaml#
-
 examples:
   - |
     #include <dt-bindings/interrupt-controller/arm-gic.h>
@@ -133,6 +136,21 @@ examples:
         interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
         interrupt-controller;
         vdd-supply = <&p3v3>;
-        gpio-reserved-ranges = <5 1>;
+        gpio-reserved-ranges = <1 2>, <6 1>, <10 1>, <15 1>;
+
+        pinctrl-0 = <&U62160_pins>, <&U62160_ipins>;
+        pinctrl-names = "default";
+        U62160_pins: cfg-pins {
+                        pins = "gp03", "gp16", "gp20", "gp50", "gp51";
+                        function = "gpio";
+                        input-enable;
+                        bias-pull-up;
+        };
+        U62160_ipins: icfg-pins {
+                        pins = "gp04", "gp17", "gp21", "gp52", "gp53";
+                        function = "gpio";
+                        input-enable;
+                        bias-pull-up;
+        };
       };
     };

base-commit: 861c0981648f5b64c86fd028ee622096eb7af05a
-- 
2.42.0


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

* Re: [PATCH v2] dt-bindings: pinctrl: cy8x95x0: Minor fix & update
  2024-01-30 12:08 [PATCH v2] dt-bindings: pinctrl: cy8x95x0: Minor fix & update Naresh Solanki
@ 2024-01-30 12:19 ` Krzysztof Kozlowski
  2024-01-30 12:26   ` Naresh Solanki
  0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2024-01-30 12:19 UTC (permalink / raw)
  To: Naresh Solanki, Linus Walleij, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Patrick Rudolph
  Cc: mazziesaccount, linux-gpio, devicetree, linux-kernel

On 30/01/2024 13:08, Naresh Solanki wrote:
> Update maxItems to 60 for gpio-reserved-ranges to allow multiple gpio
> reserved ranges.
> Add input-enable property to allow configuring a pin as input.
> Rearrange allOf

Why?

> Update example.
> 
> Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com>
> ---
>  .../bindings/pinctrl/cypress,cy8c95x0.yaml    | 28 +++++++++++++++----
>  1 file changed, 23 insertions(+), 5 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/pinctrl/cypress,cy8c95x0.yaml b/Documentation/devicetree/bindings/pinctrl/cypress,cy8c95x0.yaml
> index 7f30ec2f1e54..89ce0cb68834 100644
> --- a/Documentation/devicetree/bindings/pinctrl/cypress,cy8c95x0.yaml
> +++ b/Documentation/devicetree/bindings/pinctrl/cypress,cy8c95x0.yaml
> @@ -45,7 +45,8 @@ properties:
>      maxItems: 1
>  
>    gpio-reserved-ranges:
> -    maxItems: 1
> +    minItems: 1
> +    maxItems: 60
>  
>    vdd-supply:
>      description:
> @@ -85,6 +86,8 @@ patternProperties:
>  
>        bias-disable: true
>  
> +      input-enable: true
> +
>        output-high: true
>  
>        output-low: true
> @@ -101,6 +104,9 @@ patternProperties:
>  
>      additionalProperties: false
>  
> +allOf:
> +  - $ref: pinctrl.yaml#
> +

That's not a correct placement.

>  required:
>    - compatible
>    - reg
> @@ -112,9 +118,6 @@ required:
>  
>  additionalProperties: false
>  
> -allOf:
> -  - $ref: pinctrl.yaml#
> -
>  examples:
>    - |
>      #include <dt-bindings/interrupt-controller/arm-gic.h>
> @@ -133,6 +136,21 @@ examples:
>          interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
>          interrupt-controller;
>          vdd-supply = <&p3v3>;
> -        gpio-reserved-ranges = <5 1>;
> +        gpio-reserved-ranges = <1 2>, <6 1>, <10 1>, <15 1>;
> +
> +        pinctrl-0 = <&U62160_pins>, <&U62160_ipins>;
> +        pinctrl-names = "default";
> +        U62160_pins: cfg-pins {
> +                        pins = "gp03", "gp16", "gp20", "gp50", "gp51";

Your indentation is totally broken.


Best regards,
Krzysztof


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

* Re: [PATCH v2] dt-bindings: pinctrl: cy8x95x0: Minor fix & update
  2024-01-30 12:19 ` Krzysztof Kozlowski
@ 2024-01-30 12:26   ` Naresh Solanki
  2024-01-30 12:31     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 5+ messages in thread
From: Naresh Solanki @ 2024-01-30 12:26 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Linus Walleij, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Patrick Rudolph, mazziesaccount, linux-gpio, devicetree,
	linux-kernel

Hi Krzysztof,

On Tue, 30 Jan 2024 at 17:49, Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 30/01/2024 13:08, Naresh Solanki wrote:
> > Update maxItems to 60 for gpio-reserved-ranges to allow multiple gpio
> > reserved ranges.
> > Add input-enable property to allow configuring a pin as input.
> > Rearrange allOf
>
> Why?
allOf is aligned with other implementations.
>
> > Update example.
> >
> > Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com>
> > ---
> >  .../bindings/pinctrl/cypress,cy8c95x0.yaml    | 28 +++++++++++++++----
> >  1 file changed, 23 insertions(+), 5 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/pinctrl/cypress,cy8c95x0.yaml b/Documentation/devicetree/bindings/pinctrl/cypress,cy8c95x0.yaml
> > index 7f30ec2f1e54..89ce0cb68834 100644
> > --- a/Documentation/devicetree/bindings/pinctrl/cypress,cy8c95x0.yaml
> > +++ b/Documentation/devicetree/bindings/pinctrl/cypress,cy8c95x0.yaml
> > @@ -45,7 +45,8 @@ properties:
> >      maxItems: 1
> >
> >    gpio-reserved-ranges:
> > -    maxItems: 1
> > +    minItems: 1
> > +    maxItems: 60
> >
> >    vdd-supply:
> >      description:
> > @@ -85,6 +86,8 @@ patternProperties:
> >
> >        bias-disable: true
> >
> > +      input-enable: true
> > +
> >        output-high: true
> >
> >        output-low: true
> > @@ -101,6 +104,9 @@ patternProperties:
> >
> >      additionalProperties: false
> >
> > +allOf:
> > +  - $ref: pinctrl.yaml#
> > +
>
> That's not a correct placement.
ok. Will remove this specific change.
>
> >  required:
> >    - compatible
> >    - reg
> > @@ -112,9 +118,6 @@ required:
> >
> >  additionalProperties: false
> >
> > -allOf:
> > -  - $ref: pinctrl.yaml#
> > -
> >  examples:
> >    - |
> >      #include <dt-bindings/interrupt-controller/arm-gic.h>
> > @@ -133,6 +136,21 @@ examples:
> >          interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
> >          interrupt-controller;
> >          vdd-supply = <&p3v3>;
> > -        gpio-reserved-ranges = <5 1>;
> > +        gpio-reserved-ranges = <1 2>, <6 1>, <10 1>, <15 1>;
> > +
> > +        pinctrl-0 = <&U62160_pins>, <&U62160_ipins>;
> > +        pinctrl-names = "default";
> > +        U62160_pins: cfg-pins {
> > +                        pins = "gp03", "gp16", "gp20", "gp50", "gp51";
>
> Your indentation is totally broken.
sorry I missed checking on this before sending the patch for review. will fix
it to use two space for indentation.

Regards,
Naresh
>
>
> Best regards,
> Krzysztof
>

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

* Re: [PATCH v2] dt-bindings: pinctrl: cy8x95x0: Minor fix & update
  2024-01-30 12:26   ` Naresh Solanki
@ 2024-01-30 12:31     ` Krzysztof Kozlowski
  2024-01-30 12:35       ` Naresh Solanki
  0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2024-01-30 12:31 UTC (permalink / raw)
  To: Naresh Solanki
  Cc: Linus Walleij, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Patrick Rudolph, mazziesaccount, linux-gpio, devicetree,
	linux-kernel

On 30/01/2024 13:26, Naresh Solanki wrote:
> Hi Krzysztof,
> 
> On Tue, 30 Jan 2024 at 17:49, Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> On 30/01/2024 13:08, Naresh Solanki wrote:
>>> Update maxItems to 60 for gpio-reserved-ranges to allow multiple gpio
>>> reserved ranges.
>>> Add input-enable property to allow configuring a pin as input.
>>> Rearrange allOf
>>
>> Why?
> allOf is aligned with other implementations.

Which ones? example-schema and other implementations have it in
different place. If you align some parts of the code, please align to
match the correct code, not other incorrect. How to find it?
example-schema is the reference, recent commits are also sometimes good
indication.

Best regards,
Krzysztof


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

* Re: [PATCH v2] dt-bindings: pinctrl: cy8x95x0: Minor fix & update
  2024-01-30 12:31     ` Krzysztof Kozlowski
@ 2024-01-30 12:35       ` Naresh Solanki
  0 siblings, 0 replies; 5+ messages in thread
From: Naresh Solanki @ 2024-01-30 12:35 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Linus Walleij, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Patrick Rudolph, mazziesaccount, linux-gpio, devicetree,
	linux-kernel

Hi Krzysztof,


On Tue, 30 Jan 2024 at 18:01, Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 30/01/2024 13:26, Naresh Solanki wrote:
> > Hi Krzysztof,
> >
> > On Tue, 30 Jan 2024 at 17:49, Krzysztof Kozlowski
> > <krzysztof.kozlowski@linaro.org> wrote:
> >>
> >> On 30/01/2024 13:08, Naresh Solanki wrote:
> >>> Update maxItems to 60 for gpio-reserved-ranges to allow multiple gpio
> >>> reserved ranges.
> >>> Add input-enable property to allow configuring a pin as input.
> >>> Rearrange allOf
> >>
> >> Why?
> > allOf is aligned with other implementations.
>
> Which ones? example-schema and other implementations have it in
> different place. If you align some parts of the code, please align to
> match the correct code, not other incorrect. How to find it?
> example-schema is the reference, recent commits are also sometimes good
> indication.
Yes your right. Will align with example-schema. Thanks.

Regards,
Naresh
>
> Best regards,
> Krzysztof
>

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

end of thread, other threads:[~2024-01-30 12:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-30 12:08 [PATCH v2] dt-bindings: pinctrl: cy8x95x0: Minor fix & update Naresh Solanki
2024-01-30 12:19 ` Krzysztof Kozlowski
2024-01-30 12:26   ` Naresh Solanki
2024-01-30 12:31     ` Krzysztof Kozlowski
2024-01-30 12:35       ` Naresh Solanki

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