2022-10-03 09:56:41

by ChiaEn Wu

[permalink] [raw]
Subject: [PATCH v2] dt-bindings: mfd: mt6370: fix the interrupt order of the charger in the example

From: ChiaEn Wu <[email protected]>

Fix the interrupt order of the charger in the binding example.

Fixes: 76f52f815f1a ("dt-bindings: mfd: Add MediaTek MT6370")
Signed-off-by: ChiaEn Wu <[email protected]>
Acked-by: Krzysztof Kozlowski <[email protected]>
---

v2
- Revise the commit syntax.

v1
- Due to this patch modifiacation
(https://lore.kernel.org/all/[email protected]/),
there will get some warnings in linux-next when compiling the dts.

---
Documentation/devicetree/bindings/mfd/mediatek,mt6370.yaml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/mfd/mediatek,mt6370.yaml b/Documentation/devicetree/bindings/mfd/mediatek,mt6370.yaml
index 410e2d4..1f67e06 100644
--- a/Documentation/devicetree/bindings/mfd/mediatek,mt6370.yaml
+++ b/Documentation/devicetree/bindings/mfd/mediatek,mt6370.yaml
@@ -139,8 +139,8 @@ examples:

charger {
compatible = "mediatek,mt6370-charger";
- interrupts = <48>, <68>, <6>;
- interrupt-names = "attach_i", "uvp_d_evt", "mivr";
+ interrupts = <68>, <48>, <6>;
+ interrupt-names = "uvp_d_evt", "attach_i", "mivr";
io-channels = <&mt6370_adc MT6370_CHAN_IBUS>;

mt6370_otg_vbus: usb-otg-vbus-regulator {
--
2.7.4


Subject: Re: [PATCH v2] dt-bindings: mfd: mt6370: fix the interrupt order of the charger in the example

Il 03/10/22 11:04, ChiaEn Wu ha scritto:
> From: ChiaEn Wu <[email protected]>
>
> Fix the interrupt order of the charger in the binding example.
>
> Fixes: 76f52f815f1a ("dt-bindings: mfd: Add MediaTek MT6370")
> Signed-off-by: ChiaEn Wu <[email protected]>
> Acked-by: Krzysztof Kozlowski <[email protected]>

Reviewed-by: AngeloGioacchino Del Regno <[email protected]>


2022-10-03 15:46:47

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH v2] dt-bindings: mfd: mt6370: fix the interrupt order of the charger in the example

On Mon, Oct 3, 2022 at 4:05 AM ChiaEn Wu <[email protected]> wrote:
>
> From: ChiaEn Wu <[email protected]>
>
> Fix the interrupt order of the charger in the binding example.
>
> Fixes: 76f52f815f1a ("dt-bindings: mfd: Add MediaTek MT6370")
> Signed-off-by: ChiaEn Wu <[email protected]>
> Acked-by: Krzysztof Kozlowski <[email protected]>
> ---
>
> v2
> - Revise the commit syntax.
>
> v1
> - Due to this patch modifiacation
> (https://lore.kernel.org/all/[email protected]/),
> there will get some warnings in linux-next when compiling the dts.

This doesn't fix all the warnings. These still remain:

/home/rob/proj/linux-dt/.build-arm64/Documentation/devicetree/bindings/mfd/mediatek,mt6370.example.dtb:
pmic@34: indicator: 'color' is a required property
From schema:
/home/rob/proj/linux-dt/Documentation/devicetree/bindings/mfd/mediatek,mt6370.yaml
/home/rob/proj/linux-dt/.build-arm64/Documentation/devicetree/bindings/mfd/mediatek,mt6370.example.dtb:
indicator: $nodename:0: 'indicator' does not match
'^multi-led(@[0-9a-f])?$'
From schema:
/home/rob/proj/linux-dt/Documentation/devicetree/bindings/leds/mediatek,mt6370-indicator.yaml

2022-10-05 08:27:55

by ChiaEn Wu

[permalink] [raw]
Subject: Re: [PATCH v2] dt-bindings: mfd: mt6370: fix the interrupt order of the charger in the example

On Mon, Oct 3, 2022 at 11:34 PM Rob Herring <[email protected]> wrote:
>

...

>
> This doesn't fix all the warnings. These still remain:
>
> /home/rob/proj/linux-dt/.build-arm64/Documentation/devicetree/bindings/mfd/mediatek,mt6370.example.dtb:
> pmic@34: indicator: 'color' is a required property
> From schema:
> /home/rob/proj/linux-dt/Documentation/devicetree/bindings/mfd/mediatek,mt6370.yaml
> /home/rob/proj/linux-dt/.build-arm64/Documentation/devicetree/bindings/mfd/mediatek,mt6370.example.dtb:
> indicator: $nodename:0: 'indicator' does not match
> '^multi-led(@[0-9a-f])?$'
> From schema:
> /home/rob/proj/linux-dt/Documentation/devicetree/bindings/leds/mediatek,mt6370-indicator.yaml

Hi Rob,

In my opinion, the root cause of these warnings is the incorrect usage
of 'allOf' in our LED indicator dts as follows,
(https://lore.kernel.org/all/27df85c30277a171ae85ff6d5b7d867625765d0a.1663926551.git.chiaen_wu@richtek.com/)
----------
+allOf:
+ - $ref: leds-class-multicolor.yaml#
+
+properties:
+ compatible:
+ const: mediatek,mt6370-indicator
+
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 0
+
+patternProperties:
+ "^multi-led@[0-3]$":
+ type: object
----------

and this patch for Linux 6.0
(https://lore.kernel.org/all/[email protected]/)

I will revise our LED indicator dts in the next version(v13) of
'MT6370 patch series' like this,
----------
// Remove 'allOf'

+properties:
+ compatible:
+ const: mediatek,mt6370-indicator
+
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 0
+
+patternProperties:
+ "^multi-led@[0-3]$":
+ type: object
+ $ref: leds-class-multicolor.yaml# // Add this line
+ unevaluatedProperties: false // Add this line
----------

And this '[PATCH v2] dt-bindings: mfd: mt6370: fix the interrupt order
of the charger in the example' patch is for fix charger example in MFD
dts.
Thank you so much.

--
Best Regards,
ChiaEn Wu

2022-10-05 08:53:26

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2] dt-bindings: mfd: mt6370: fix the interrupt order of the charger in the example

On 05/10/2022 10:14, ChiaEn Wu wrote:
> On Mon, Oct 3, 2022 at 11:34 PM Rob Herring <[email protected]> wrote:
>> This doesn't fix all the warnings. These still remain:
>>
>> /home/rob/proj/linux-dt/.build-arm64/Documentation/devicetree/bindings/mfd/mediatek,mt6370.example.dtb:
>> pmic@34: indicator: 'color' is a required property
>> From schema:
>> /home/rob/proj/linux-dt/Documentation/devicetree/bindings/mfd/mediatek,mt6370.yaml
>> /home/rob/proj/linux-dt/.build-arm64/Documentation/devicetree/bindings/mfd/mediatek,mt6370.example.dtb:
>> indicator: $nodename:0: 'indicator' does not match
>> '^multi-led(@[0-9a-f])?$'
>> From schema:
>> /home/rob/proj/linux-dt/Documentation/devicetree/bindings/leds/mediatek,mt6370-indicator.yaml
>
> Hi Rob,
>
> In my opinion, the root cause of these warnings is the incorrect usage
> of 'allOf' in our LED indicator dts as follows,
> (https://lore.kernel.org/all/27df85c30277a171ae85ff6d5b7d867625765d0a.1663926551.git.chiaen_wu@richtek.com/)

Eh, my patch was merged in July... and yours from September still does
not use updated multi-led bindings. Was it even tested before sending?

Best regards,
Krzysztof

2022-10-05 09:38:09

by ChiaEn Wu

[permalink] [raw]
Subject: Re: [PATCH v2] dt-bindings: mfd: mt6370: fix the interrupt order of the charger in the example

On Wed, Oct 5, 2022 at 4:33 PM Krzysztof Kozlowski
<[email protected]> wrote:
>
...
>
> Eh, my patch was merged in July... and yours from September still does
> not use updated multi-led bindings. Was it even tested before sending?
>
> Best regards,
> Krzysztof
>

Hi Krzysztof,

I must apologize for checking our patches are based on v5.19 (I also
forgot to apply your patch before checking patches......), not the
v6.0-rc series at that time.
I will update the latest code and check my patch again and again
before submitting the patch next time.
I'm very sorry for this mistake.......

--
Best Regards,
ChiaEn Wu

2022-10-05 16:39:01

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2] dt-bindings: mfd: mt6370: fix the interrupt order of the charger in the example

On 05/10/2022 10:59, ChiaEn Wu wrote:
> On Wed, Oct 5, 2022 at 4:33 PM Krzysztof Kozlowski
> <[email protected]> wrote:
>>
> ...
>>
>> Eh, my patch was merged in July... and yours from September still does
>> not use updated multi-led bindings. Was it even tested before sending?
>>
>> Best regards,
>> Krzysztof
>>
>
> Hi Krzysztof,
>
> I must apologize for checking our patches are based on v5.19 (I also
> forgot to apply your patch before checking patches......), not the
> v6.0-rc series at that time.
> I will update the latest code and check my patch again and again
> before submitting the patch next time.
> I'm very sorry for this mistake.......

Always base your patches on one of: latest mainline kernel, latest
maintainer's tree or recent linux-next.

Best regards,
Krzysztof