diff mbox series

[v4,03/38] dt-bindings: mfd: qcom-pm8xxx: allow using interrupts-extended

Message ID 20230827005920.898719-4-dmitry.baryshkov@linaro.org (mailing list archive)
State Superseded
Headers show
Series ARM: dts: qcom: cleanup PMIC usage | expand

Commit Message

Dmitry Baryshkov Aug. 27, 2023, 12:58 a.m. UTC
Allow using interrupts-extended, which is a preferred form of interrupts
specification compared to the interrupt-parrent + interrupts pair.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

Comments

Krzysztof Kozlowski Aug. 27, 2023, 8:35 a.m. UTC | #1
On 27/08/2023 02:58, Dmitry Baryshkov wrote:
> Allow using interrupts-extended, which is a preferred form of interrupts
> specification compared to the interrupt-parrent + interrupts pair.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml b/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml
> index 7fe3875a5996..33d9615e63c8 100644
> --- a/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml
> +++ b/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml
> @@ -37,6 +37,9 @@ properties:
>    interrupts:
>      maxItems: 1
>  
> +  interrupts-extended:
> +    maxItems: 1

The entire patch is not needed. At least should not be needed. What
problem are you trying to solve here?


Best regards,
Krzysztof
Dmitry Baryshkov Aug. 27, 2023, 10:42 a.m. UTC | #2
On Sun, 27 Aug 2023 at 11:35, Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 27/08/2023 02:58, Dmitry Baryshkov wrote:
> > Allow using interrupts-extended, which is a preferred form of interrupts
> > specification compared to the interrupt-parrent + interrupts pair.
> >
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > ---
> >  Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml | 10 +++++++++-
> >  1 file changed, 9 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml b/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml
> > index 7fe3875a5996..33d9615e63c8 100644
> > --- a/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml
> > +++ b/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml
> > @@ -37,6 +37,9 @@ properties:
> >    interrupts:
> >      maxItems: 1
> >
> > +  interrupts-extended:
> > +    maxItems: 1
>
> The entire patch is not needed. At least should not be needed. What
> problem are you trying to solve here?

The main problem is the next chunk, which (currently) explicitly
requires `interrupts' property. My goal is to allow
`interrupts-extended' in addition to `interrupts'.
Krzysztof Kozlowski Aug. 27, 2023, 11:12 a.m. UTC | #3
On 27/08/2023 12:42, Dmitry Baryshkov wrote:
> On Sun, 27 Aug 2023 at 11:35, Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> On 27/08/2023 02:58, Dmitry Baryshkov wrote:
>>> Allow using interrupts-extended, which is a preferred form of interrupts
>>> specification compared to the interrupt-parrent + interrupts pair.
>>>
>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>>> ---
>>>  Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml | 10 +++++++++-
>>>  1 file changed, 9 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml b/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml
>>> index 7fe3875a5996..33d9615e63c8 100644
>>> --- a/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml
>>> +++ b/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml
>>> @@ -37,6 +37,9 @@ properties:
>>>    interrupts:
>>>      maxItems: 1
>>>
>>> +  interrupts-extended:
>>> +    maxItems: 1
>>
>> The entire patch is not needed. At least should not be needed. What
>> problem are you trying to solve here?
> 
> The main problem is the next chunk, which (currently) explicitly
> requires `interrupts' property. My goal is to allow
> `interrupts-extended' in addition to `interrupts'.

They are allowed. Why do you think they aren't? That's why I don't
understand what real problem is here.

Best regards,
Krzysztof
Dmitry Baryshkov Aug. 27, 2023, 11:48 a.m. UTC | #4
On Sun, 27 Aug 2023 at 14:12, Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 27/08/2023 12:42, Dmitry Baryshkov wrote:
> > On Sun, 27 Aug 2023 at 11:35, Krzysztof Kozlowski
> > <krzysztof.kozlowski@linaro.org> wrote:
> >>
> >> On 27/08/2023 02:58, Dmitry Baryshkov wrote:
> >>> Allow using interrupts-extended, which is a preferred form of interrupts
> >>> specification compared to the interrupt-parrent + interrupts pair.
> >>>
> >>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> >>> ---
> >>>  Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml | 10 +++++++++-
> >>>  1 file changed, 9 insertions(+), 1 deletion(-)
> >>>
> >>> diff --git a/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml b/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml
> >>> index 7fe3875a5996..33d9615e63c8 100644
> >>> --- a/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml
> >>> +++ b/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml
> >>> @@ -37,6 +37,9 @@ properties:
> >>>    interrupts:
> >>>      maxItems: 1
> >>>
> >>> +  interrupts-extended:
> >>> +    maxItems: 1
> >>
> >> The entire patch is not needed. At least should not be needed. What
> >> problem are you trying to solve here?
> >
> > The main problem is the next chunk, which (currently) explicitly
> > requires `interrupts' property. My goal is to allow
> > `interrupts-extended' in addition to `interrupts'.
>
> They are allowed. Why do you think they aren't? That's why I don't
> understand what real problem is here.

qcom-pm8xxx.yaml lists `interrupts' property under the `required'
clause. So I can not simply replace it with `interrupts-extended'
Krzysztof Kozlowski Aug. 27, 2023, noon UTC | #5
On 27/08/2023 13:48, Dmitry Baryshkov wrote:
> On Sun, 27 Aug 2023 at 14:12, Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> On 27/08/2023 12:42, Dmitry Baryshkov wrote:
>>> On Sun, 27 Aug 2023 at 11:35, Krzysztof Kozlowski
>>> <krzysztof.kozlowski@linaro.org> wrote:
>>>>
>>>> On 27/08/2023 02:58, Dmitry Baryshkov wrote:
>>>>> Allow using interrupts-extended, which is a preferred form of interrupts
>>>>> specification compared to the interrupt-parrent + interrupts pair.
>>>>>
>>>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>>>>> ---
>>>>>  Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml | 10 +++++++++-
>>>>>  1 file changed, 9 insertions(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml b/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml
>>>>> index 7fe3875a5996..33d9615e63c8 100644
>>>>> --- a/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml
>>>>> +++ b/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml
>>>>> @@ -37,6 +37,9 @@ properties:
>>>>>    interrupts:
>>>>>      maxItems: 1
>>>>>
>>>>> +  interrupts-extended:
>>>>> +    maxItems: 1
>>>>
>>>> The entire patch is not needed. At least should not be needed. What
>>>> problem are you trying to solve here?
>>>
>>> The main problem is the next chunk, which (currently) explicitly
>>> requires `interrupts' property. My goal is to allow
>>> `interrupts-extended' in addition to `interrupts'.
>>
>> They are allowed. Why do you think they aren't? That's why I don't
>> understand what real problem is here.
> 
> qcom-pm8xxx.yaml lists `interrupts' property under the `required'
> clause. So I can not simply replace it with `interrupts-extended'

Since when? So again: The entire patch is not needed.


Best regards,
Krzysztof
Dmitry Baryshkov Aug. 27, 2023, 12:57 p.m. UTC | #6
On Sun, 27 Aug 2023 at 15:00, Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 27/08/2023 13:48, Dmitry Baryshkov wrote:
> > On Sun, 27 Aug 2023 at 14:12, Krzysztof Kozlowski
> > <krzysztof.kozlowski@linaro.org> wrote:
> >>
> >> On 27/08/2023 12:42, Dmitry Baryshkov wrote:
> >>> On Sun, 27 Aug 2023 at 11:35, Krzysztof Kozlowski
> >>> <krzysztof.kozlowski@linaro.org> wrote:
> >>>>
> >>>> On 27/08/2023 02:58, Dmitry Baryshkov wrote:
> >>>>> Allow using interrupts-extended, which is a preferred form of interrupts
> >>>>> specification compared to the interrupt-parrent + interrupts pair.
> >>>>>
> >>>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> >>>>> ---
> >>>>>  Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml | 10 +++++++++-
> >>>>>  1 file changed, 9 insertions(+), 1 deletion(-)
> >>>>>
> >>>>> diff --git a/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml b/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml
> >>>>> index 7fe3875a5996..33d9615e63c8 100644
> >>>>> --- a/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml
> >>>>> +++ b/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml
> >>>>> @@ -37,6 +37,9 @@ properties:
> >>>>>    interrupts:
> >>>>>      maxItems: 1
> >>>>>
> >>>>> +  interrupts-extended:
> >>>>> +    maxItems: 1
> >>>>
> >>>> The entire patch is not needed. At least should not be needed. What
> >>>> problem are you trying to solve here?
> >>>
> >>> The main problem is the next chunk, which (currently) explicitly
> >>> requires `interrupts' property. My goal is to allow
> >>> `interrupts-extended' in addition to `interrupts'.
> >>
> >> They are allowed. Why do you think they aren't? That's why I don't
> >> understand what real problem is here.
> >
> > qcom-pm8xxx.yaml lists `interrupts' property under the `required'
> > clause. So I can not simply replace it with `interrupts-extended'
>
> Since when? So again: The entire patch is not needed.

Hmm, interesting. I'm pretty sure that I saw the issue, but now I can
no longer reproduce it. Maybe I misinterpreted some other warning
which I saw while this was WIP.
I see that it is handled by the `fixup_interrupts` in dtschema itself.
Krzysztof Kozlowski Aug. 27, 2023, 6:05 p.m. UTC | #7
On 27/08/2023 14:57, Dmitry Baryshkov wrote:

>>>>>>
>>>>>> The entire patch is not needed. At least should not be needed. What
>>>>>> problem are you trying to solve here?
>>>>>
>>>>> The main problem is the next chunk, which (currently) explicitly
>>>>> requires `interrupts' property. My goal is to allow
>>>>> `interrupts-extended' in addition to `interrupts'.
>>>>
>>>> They are allowed. Why do you think they aren't? That's why I don't
>>>> understand what real problem is here.
>>>
>>> qcom-pm8xxx.yaml lists `interrupts' property under the `required'
>>> clause. So I can not simply replace it with `interrupts-extended'
>>
>> Since when? So again: The entire patch is not needed.
> 
> Hmm, interesting. I'm pretty sure that I saw the issue, but now I can
> no longer reproduce it. Maybe I misinterpreted some other warning
> which I saw while this was WIP.
> I see that it is handled by the `fixup_interrupts` in dtschema itself.

If interrupts were brought by some other schema and that one did not
evaluate, then you could see errors about interrupt-extended. But that's
not the case here.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml b/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml
index 7fe3875a5996..33d9615e63c8 100644
--- a/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml
+++ b/Documentation/devicetree/bindings/mfd/qcom-pm8xxx.yaml
@@ -37,6 +37,9 @@  properties:
   interrupts:
     maxItems: 1
 
+  interrupts-extended:
+    maxItems: 1
+
   '#interrupt-cells':
     const: 2
 
@@ -75,11 +78,16 @@  patternProperties:
     type: object
     $ref: /schemas/iio/adc/qcom,pm8018-adc.yaml#
 
+oneOf:
+  - required:
+      - interrupts
+  - required:
+      - interrupts-extended
+
 required:
   - compatible
   - '#address-cells'
   - '#size-cells'
-  - interrupts
   - '#interrupt-cells'
   - interrupt-controller