devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: mfd: cros-ec: Allow interrupts-extended property
@ 2023-11-30  8:33 Chen-Yu Tsai
  2023-11-30  8:52 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 5+ messages in thread
From: Chen-Yu Tsai @ 2023-11-30  8:33 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Benson Leung, Guenter Roeck
  Cc: Chen-Yu Tsai, devicetree, chrome-platform, linux-kernel

"interrupts-extended" provides a more concise way of describing external
GPIO interrupts.

Allow using this instead of "interrupts" plus "interrupt-parent" for
cros-ec.

Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
---
 .../devicetree/bindings/mfd/google,cros-ec.yaml          | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
index e1ca4f297c6d..e514eac9f4fc 100644
--- a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
+++ b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
@@ -75,6 +75,9 @@ properties:
   interrupts:
     maxItems: 1
 
+  interrupts-extended:
+    maxItems: 1
+
   reset-gpios:
     maxItems: 1
 
@@ -199,9 +202,13 @@ allOf:
                 - google,cros-ec-rpmsg
                 - google,cros-ec-uart
     then:
+      oneOf:
+        - required:
+            - interrupts
+        - required:
+            - interrupts-extended
       required:
         - reg
-        - interrupts
 
   - if:
       properties:
-- 
2.43.0.rc2.451.g8631bc7472-goog


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

* Re: [PATCH] dt-bindings: mfd: cros-ec: Allow interrupts-extended property
  2023-11-30  8:33 [PATCH] dt-bindings: mfd: cros-ec: Allow interrupts-extended property Chen-Yu Tsai
@ 2023-11-30  8:52 ` Krzysztof Kozlowski
  2023-12-01  4:37   ` Chen-Yu Tsai
  0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-11-30  8:52 UTC (permalink / raw)
  To: Chen-Yu Tsai, Lee Jones, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Benson Leung, Guenter Roeck
  Cc: devicetree, chrome-platform, linux-kernel

On 30/11/2023 09:33, Chen-Yu Tsai wrote:
> "interrupts-extended" provides a more concise way of describing external
> GPIO interrupts.
> 
> Allow using this instead of "interrupts" plus "interrupt-parent" for
> cros-ec.
> 
> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
> ---
>  .../devicetree/bindings/mfd/google,cros-ec.yaml          | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
> index e1ca4f297c6d..e514eac9f4fc 100644
> --- a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
> +++ b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
> @@ -75,6 +75,9 @@ properties:
>    interrupts:
>      maxItems: 1
>  
> +  interrupts-extended:
> +    maxItems: 1
> +

I don't understand why you need it. You already have interrupts there,
so this is redundant. I suggest to drop the patch or provide real
rationale (which I doubt you can get :) ).

Best regards,
Krzysztof


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

* Re: [PATCH] dt-bindings: mfd: cros-ec: Allow interrupts-extended property
  2023-11-30  8:52 ` Krzysztof Kozlowski
@ 2023-12-01  4:37   ` Chen-Yu Tsai
  2023-12-01  8:03     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 5+ messages in thread
From: Chen-Yu Tsai @ 2023-12-01  4:37 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Benson Leung, Guenter Roeck, devicetree, chrome-platform,
	linux-kernel

On Thu, Nov 30, 2023 at 4:52 PM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 30/11/2023 09:33, Chen-Yu Tsai wrote:
> > "interrupts-extended" provides a more concise way of describing external
> > GPIO interrupts.
> >
> > Allow using this instead of "interrupts" plus "interrupt-parent" for
> > cros-ec.
> >
> > Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
> > ---
> >  .../devicetree/bindings/mfd/google,cros-ec.yaml          | 9 ++++++++-
> >  1 file changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
> > index e1ca4f297c6d..e514eac9f4fc 100644
> > --- a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
> > +++ b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
> > @@ -75,6 +75,9 @@ properties:
> >    interrupts:
> >      maxItems: 1
> >
> > +  interrupts-extended:
> > +    maxItems: 1
> > +
>
> I don't understand why you need it. You already have interrupts there,
> so this is redundant. I suggest to drop the patch or provide real
> rationale (which I doubt you can get :) ).

I'm sorry, I should've included this in the commit message.

The other half of the patch gets rid of a DT validation fail when
interrupts-extended is used instead of interrupts:

.../arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r1.dtb: ec@0:
'interrupts' is a required property
    from schema $id: http://devicetree.org/schemas/mfd/google,cros-ec.yaml#


maxItems for interrupts-extended was included for completeness. Maybe it
isn't needed? But then how would the validator know how many items should
there be when interrupts-extended is used


Regards
ChenYu

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

* Re: [PATCH] dt-bindings: mfd: cros-ec: Allow interrupts-extended property
  2023-12-01  4:37   ` Chen-Yu Tsai
@ 2023-12-01  8:03     ` Krzysztof Kozlowski
  2023-12-06 17:09       ` Rob Herring
  0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-12-01  8:03 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Benson Leung, Guenter Roeck, devicetree, chrome-platform,
	linux-kernel

On 01/12/2023 05:37, Chen-Yu Tsai wrote:
> On Thu, Nov 30, 2023 at 4:52 PM Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> On 30/11/2023 09:33, Chen-Yu Tsai wrote:
>>> "interrupts-extended" provides a more concise way of describing external
>>> GPIO interrupts.
>>>
>>> Allow using this instead of "interrupts" plus "interrupt-parent" for
>>> cros-ec.
>>>
>>> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
>>> ---
>>>  .../devicetree/bindings/mfd/google,cros-ec.yaml          | 9 ++++++++-
>>>  1 file changed, 8 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
>>> index e1ca4f297c6d..e514eac9f4fc 100644
>>> --- a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
>>> +++ b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
>>> @@ -75,6 +75,9 @@ properties:
>>>    interrupts:
>>>      maxItems: 1
>>>
>>> +  interrupts-extended:
>>> +    maxItems: 1
>>> +
>>
>> I don't understand why you need it. You already have interrupts there,
>> so this is redundant. I suggest to drop the patch or provide real
>> rationale (which I doubt you can get :) ).
> 
> I'm sorry, I should've included this in the commit message.
> 
> The other half of the patch gets rid of a DT validation fail when
> interrupts-extended is used instead of interrupts:
> 
> .../arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r1.dtb: ec@0:
> 'interrupts' is a required property
>     from schema $id: http://devicetree.org/schemas/mfd/google,cros-ec.yaml#
> 

That looks either like a bug in bindings or in dtschema or in your DTS.
This patch should not be needed to solve that.


Best regards,
Krzysztof


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

* Re: [PATCH] dt-bindings: mfd: cros-ec: Allow interrupts-extended property
  2023-12-01  8:03     ` Krzysztof Kozlowski
@ 2023-12-06 17:09       ` Rob Herring
  0 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2023-12-06 17:09 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Chen-Yu Tsai, Lee Jones, Krzysztof Kozlowski, Conor Dooley,
	Benson Leung, Guenter Roeck, devicetree, chrome-platform,
	linux-kernel

On Fri, Dec 01, 2023 at 09:03:09AM +0100, Krzysztof Kozlowski wrote:
> On 01/12/2023 05:37, Chen-Yu Tsai wrote:
> > On Thu, Nov 30, 2023 at 4:52 PM Krzysztof Kozlowski
> > <krzysztof.kozlowski@linaro.org> wrote:
> >>
> >> On 30/11/2023 09:33, Chen-Yu Tsai wrote:
> >>> "interrupts-extended" provides a more concise way of describing external
> >>> GPIO interrupts.
> >>>
> >>> Allow using this instead of "interrupts" plus "interrupt-parent" for
> >>> cros-ec.
> >>>
> >>> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
> >>> ---
> >>>  .../devicetree/bindings/mfd/google,cros-ec.yaml          | 9 ++++++++-
> >>>  1 file changed, 8 insertions(+), 1 deletion(-)
> >>>
> >>> diff --git a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
> >>> index e1ca4f297c6d..e514eac9f4fc 100644
> >>> --- a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
> >>> +++ b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
> >>> @@ -75,6 +75,9 @@ properties:
> >>>    interrupts:
> >>>      maxItems: 1
> >>>
> >>> +  interrupts-extended:
> >>> +    maxItems: 1
> >>> +
> >>
> >> I don't understand why you need it. You already have interrupts there,
> >> so this is redundant. I suggest to drop the patch or provide real
> >> rationale (which I doubt you can get :) ).
> > 
> > I'm sorry, I should've included this in the commit message.
> > 
> > The other half of the patch gets rid of a DT validation fail when
> > interrupts-extended is used instead of interrupts:
> > 
> > .../arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r1.dtb: ec@0:
> > 'interrupts' is a required property
> >     from schema $id: http://devicetree.org/schemas/mfd/google,cros-ec.yaml#
> > 
> 
> That looks either like a bug in bindings or in dtschema or in your DTS.
> This patch should not be needed to solve that.

I'll be commiting a dtschema fix soon. There's quite a few places 
needing the fixup.

Rob

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

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

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-30  8:33 [PATCH] dt-bindings: mfd: cros-ec: Allow interrupts-extended property Chen-Yu Tsai
2023-11-30  8:52 ` Krzysztof Kozlowski
2023-12-01  4:37   ` Chen-Yu Tsai
2023-12-01  8:03     ` Krzysztof Kozlowski
2023-12-06 17:09       ` Rob Herring

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