* [PATCH] dt-bindings: mfd: mediatek,mt6357: Fixup reference to pwrap node
@ 2024-08-26 6:54 Macpaul Lin
2024-08-26 15:45 ` Krzysztof Kozlowski
2024-08-26 15:50 ` Conor Dooley
0 siblings, 2 replies; 5+ messages in thread
From: Macpaul Lin @ 2024-08-26 6:54 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Matthias Brugger, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Alexandre Mergnat,
Flora Fu
Cc: Bear Wang, Pablo Sun, Macpaul Lin, Macpaul Lin, Sen Chu,
Chris-qj chen, MediaTek Chromebook Upstream, linux-kernel,
linux-arm-kernel, linux-mediatek, devicetree, Chen-Yu Tsai
The mt6357 is a subnode of pwrap node. Previously, the documentation
only included a note in the description of mt6357. This change adds the
appropriate $ref for pwrap to ensure clarity and correctness.
$ref: /schemas/soc/mediatek/mediatek,pwrap.yaml
Additionally, the indentation for the pmic section has been adjusted
to match the corresponding structure.
Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>
---
.../bindings/mfd/mediatek,mt6357.yaml | 124 +++++++++---------
1 file changed, 65 insertions(+), 59 deletions(-)
Changes for v1:
- This patch has been made based on linux-next/master branch.
diff --git a/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml b/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml
index b67fbe0..5f4f540 100644
--- a/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml
+++ b/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml
@@ -22,69 +22,75 @@ description: |
It is interfaced to host controller using SPI interface by a proprietary hardware
called PMIC wrapper or pwrap. This MFD is a child device of pwrap.
- See the following for pwrap node definitions:
- Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml
properties:
- compatible:
- const: mediatek,mt6357
-
- interrupts:
- maxItems: 1
-
- interrupt-controller: true
-
- "#interrupt-cells":
- const: 2
-
- mediatek,hp-pull-down:
- description:
- Earphone driver positive output stage short to
- the audio reference ground.
- type: boolean
-
- mediatek,micbias0-microvolt:
- description: Selects MIC Bias 0 output voltage.
- enum: [1700000, 1800000, 1900000, 2000000,
- 2100000, 2500000, 2600000, 2700000]
- default: 1700000
-
- mediatek,micbias1-microvolt:
- description: Selects MIC Bias 1 output voltage.
- enum: [1700000, 1800000, 1900000, 2000000,
- 2100000, 2500000, 2600000, 2700000]
- default: 1700000
-
- regulators:
- type: object
- $ref: /schemas/regulator/mediatek,mt6357-regulator.yaml
- unevaluatedProperties: false
- description:
- List of MT6357 BUCKs and LDOs regulators.
-
- rtc:
+ pwrap:
type: object
- $ref: /schemas/rtc/rtc.yaml#
- unevaluatedProperties: false
- description:
- MT6357 Real Time Clock.
+ $ref: /schemas/soc/mediatek/mediatek,pwrap.yaml
properties:
- compatible:
- const: mediatek,mt6357-rtc
- start-year: true
- required:
- - compatible
-
- keys:
- type: object
- $ref: /schemas/input/mediatek,pmic-keys.yaml
- unevaluatedProperties: false
- description:
- MT6357 power and home keys.
-
-required:
- - compatible
- - regulators
+ pmic:
+ type: object
+ additionalProperties: false
+ properties:
+ compatible:
+ const: mediatek,mt6357
+
+ interrupts:
+ maxItems: 1
+
+ interrupt-controller: true
+
+ "#interrupt-cells":
+ const: 2
+
+ mediatek,hp-pull-down:
+ description:
+ Earphone driver positive output stage short to
+ the audio reference ground.
+ type: boolean
+
+ mediatek,micbias0-microvolt:
+ description: Selects MIC Bias 0 output voltage.
+ enum: [1700000, 1800000, 1900000, 2000000,
+ 2100000, 2500000, 2600000, 2700000]
+ default: 1700000
+
+ mediatek,micbias1-microvolt:
+ description: Selects MIC Bias 1 output voltage.
+ enum: [1700000, 1800000, 1900000, 2000000,
+ 2100000, 2500000, 2600000, 2700000]
+ default: 1700000
+
+ regulators:
+ type: object
+ $ref: /schemas/regulator/mediatek,mt6357-regulator.yaml
+ unevaluatedProperties: false
+ description:
+ List of MT6357 BUCKs and LDOs regulators.
+
+ rtc:
+ type: object
+ $ref: /schemas/rtc/rtc.yaml#
+ unevaluatedProperties: false
+ description:
+ MT6357 Real Time Clock.
+ properties:
+ compatible:
+ const: mediatek,mt6357-rtc
+ start-year: true
+ required:
+ - compatible
+
+ keys:
+ type: object
+ $ref: /schemas/input/mediatek,pmic-keys.yaml
+ unevaluatedProperties: false
+ description:
+ MT6357 power and home keys.
+
+ required:
+ - compatible
+ - regulators
additionalProperties: false
--
2.45.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] dt-bindings: mfd: mediatek,mt6357: Fixup reference to pwrap node
2024-08-26 6:54 [PATCH] dt-bindings: mfd: mediatek,mt6357: Fixup reference to pwrap node Macpaul Lin
@ 2024-08-26 15:45 ` Krzysztof Kozlowski
2024-08-26 15:50 ` Conor Dooley
1 sibling, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2024-08-26 15:45 UTC (permalink / raw)
To: Macpaul Lin, AngeloGioacchino Del Regno, Matthias Brugger,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Lee Jones,
Alexandre Mergnat, Flora Fu
Cc: Bear Wang, Pablo Sun, Macpaul Lin, Sen Chu, Chris-qj chen,
MediaTek Chromebook Upstream, linux-kernel, linux-arm-kernel,
linux-mediatek, devicetree, Chen-Yu Tsai
On 26/08/2024 08:54, Macpaul Lin wrote:
> The mt6357 is a subnode of pwrap node. Previously, the documentation
> only included a note in the description of mt6357. This change adds the
> appropriate $ref for pwrap to ensure clarity and correctness.
Heh? The schema described mt6357, not pwrap. Why are you changing it?
>
> $ref: /schemas/soc/mediatek/mediatek,pwrap.yaml
>
> Additionally, the indentation for the pmic section has been adjusted
> to match the corresponding structure.
>
> Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>
> ---
> .../bindings/mfd/mediatek,mt6357.yaml | 124 +++++++++---------
> 1 file changed, 65 insertions(+), 59 deletions(-)
>
> Changes for v1:
> - This patch has been made based on linux-next/master branch.
>
> diff --git a/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml b/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml
> index b67fbe0..5f4f540 100644
> --- a/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml
> +++ b/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml
> @@ -22,69 +22,75 @@ description: |
>
> It is interfaced to host controller using SPI interface by a proprietary hardware
> called PMIC wrapper or pwrap. This MFD is a child device of pwrap.
> - See the following for pwrap node definitions:
> - Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml
>
> properties:
> - compatible:
> - const: mediatek,mt6357
How does this schema is being selected without compatible?
> -
> - interrupts:
> - maxItems: 1
> -
> - interrupt-controller: true
> -
> - "#interrupt-cells":
> - const: 2
> -
> - mediatek,hp-pull-down:
> - description:
> - Earphone driver positive output stage short to
> - the audio reference ground.
> - type: boolean
> -
> - mediatek,micbias0-microvolt:
> - description: Selects MIC Bias 0 output voltage.
> - enum: [1700000, 1800000, 1900000, 2000000,
> - 2100000, 2500000, 2600000, 2700000]
> - default: 1700000
> -
> - mediatek,micbias1-microvolt:
> - description: Selects MIC Bias 1 output voltage.
> - enum: [1700000, 1800000, 1900000, 2000000,
> - 2100000, 2500000, 2600000, 2700000]
> - default: 1700000
> -
> - regulators:
> - type: object
> - $ref: /schemas/regulator/mediatek,mt6357-regulator.yaml
> - unevaluatedProperties: false
> - description:
> - List of MT6357 BUCKs and LDOs regulators.
> -
> - rtc:
> + pwrap:
With the diff it is tricky to say what you are doing, but it feels
wrong. I don't understand the rationale, the problem being fixed here,
and considering unusual diff, this just looks wrong approach.
Bindings do not work like that - you do not reference the parent inside
the child. There is nowhere example for that, so I have no clue how did
you come up with it.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] dt-bindings: mfd: mediatek,mt6357: Fixup reference to pwrap node
2024-08-26 6:54 [PATCH] dt-bindings: mfd: mediatek,mt6357: Fixup reference to pwrap node Macpaul Lin
2024-08-26 15:45 ` Krzysztof Kozlowski
@ 2024-08-26 15:50 ` Conor Dooley
2024-08-26 16:07 ` Krzysztof Kozlowski
2024-08-30 11:25 ` Macpaul Lin
1 sibling, 2 replies; 5+ messages in thread
From: Conor Dooley @ 2024-08-26 15:50 UTC (permalink / raw)
To: Macpaul Lin
Cc: AngeloGioacchino Del Regno, Matthias Brugger, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Alexandre Mergnat,
Flora Fu, Bear Wang, Pablo Sun, Macpaul Lin, Sen Chu,
Chris-qj chen, MediaTek Chromebook Upstream, linux-kernel,
linux-arm-kernel, linux-mediatek, devicetree, Chen-Yu Tsai
[-- Attachment #1: Type: text/plain, Size: 5468 bytes --]
On Mon, Aug 26, 2024 at 02:54:15PM +0800, Macpaul Lin wrote:
> The mt6357 is a subnode of pwrap node. Previously, the documentation
> only included a note in the description of mt6357. This change adds the
> appropriate $ref for pwrap to ensure clarity and correctness.
I think this change is wrong and the existing binding is fine.
Adding the ref overcomplicates the binding completely, and stating that
this is a child node of another device is sufficient.
Instead, if anything, the pwrap binding should have a ref to /this/
binding.
Thanks,
Conor.
>
> $ref: /schemas/soc/mediatek/mediatek,pwrap.yaml
>
> Additionally, the indentation for the pmic section has been adjusted
> to match the corresponding structure.
>
> Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>
> ---
> .../bindings/mfd/mediatek,mt6357.yaml | 124 +++++++++---------
> 1 file changed, 65 insertions(+), 59 deletions(-)
>
> Changes for v1:
> - This patch has been made based on linux-next/master branch.
>
> diff --git a/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml b/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml
> index b67fbe0..5f4f540 100644
> --- a/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml
> +++ b/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml
> @@ -22,69 +22,75 @@ description: |
>
> It is interfaced to host controller using SPI interface by a proprietary hardware
> called PMIC wrapper or pwrap. This MFD is a child device of pwrap.
> - See the following for pwrap node definitions:
> - Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml
>
> properties:
> - compatible:
> - const: mediatek,mt6357
> -
> - interrupts:
> - maxItems: 1
> -
> - interrupt-controller: true
> -
> - "#interrupt-cells":
> - const: 2
> -
> - mediatek,hp-pull-down:
> - description:
> - Earphone driver positive output stage short to
> - the audio reference ground.
> - type: boolean
> -
> - mediatek,micbias0-microvolt:
> - description: Selects MIC Bias 0 output voltage.
> - enum: [1700000, 1800000, 1900000, 2000000,
> - 2100000, 2500000, 2600000, 2700000]
> - default: 1700000
> -
> - mediatek,micbias1-microvolt:
> - description: Selects MIC Bias 1 output voltage.
> - enum: [1700000, 1800000, 1900000, 2000000,
> - 2100000, 2500000, 2600000, 2700000]
> - default: 1700000
> -
> - regulators:
> - type: object
> - $ref: /schemas/regulator/mediatek,mt6357-regulator.yaml
> - unevaluatedProperties: false
> - description:
> - List of MT6357 BUCKs and LDOs regulators.
> -
> - rtc:
> + pwrap:
> type: object
> - $ref: /schemas/rtc/rtc.yaml#
> - unevaluatedProperties: false
> - description:
> - MT6357 Real Time Clock.
> + $ref: /schemas/soc/mediatek/mediatek,pwrap.yaml
> properties:
> - compatible:
> - const: mediatek,mt6357-rtc
> - start-year: true
> - required:
> - - compatible
> -
> - keys:
> - type: object
> - $ref: /schemas/input/mediatek,pmic-keys.yaml
> - unevaluatedProperties: false
> - description:
> - MT6357 power and home keys.
> -
> -required:
> - - compatible
> - - regulators
> + pmic:
> + type: object
> + additionalProperties: false
> + properties:
> + compatible:
> + const: mediatek,mt6357
> +
> + interrupts:
> + maxItems: 1
> +
> + interrupt-controller: true
> +
> + "#interrupt-cells":
> + const: 2
> +
> + mediatek,hp-pull-down:
> + description:
> + Earphone driver positive output stage short to
> + the audio reference ground.
> + type: boolean
> +
> + mediatek,micbias0-microvolt:
> + description: Selects MIC Bias 0 output voltage.
> + enum: [1700000, 1800000, 1900000, 2000000,
> + 2100000, 2500000, 2600000, 2700000]
> + default: 1700000
> +
> + mediatek,micbias1-microvolt:
> + description: Selects MIC Bias 1 output voltage.
> + enum: [1700000, 1800000, 1900000, 2000000,
> + 2100000, 2500000, 2600000, 2700000]
> + default: 1700000
> +
> + regulators:
> + type: object
> + $ref: /schemas/regulator/mediatek,mt6357-regulator.yaml
> + unevaluatedProperties: false
> + description:
> + List of MT6357 BUCKs and LDOs regulators.
> +
> + rtc:
> + type: object
> + $ref: /schemas/rtc/rtc.yaml#
> + unevaluatedProperties: false
> + description:
> + MT6357 Real Time Clock.
> + properties:
> + compatible:
> + const: mediatek,mt6357-rtc
> + start-year: true
> + required:
> + - compatible
> +
> + keys:
> + type: object
> + $ref: /schemas/input/mediatek,pmic-keys.yaml
> + unevaluatedProperties: false
> + description:
> + MT6357 power and home keys.
> +
> + required:
> + - compatible
> + - regulators
>
> additionalProperties: false
>
> --
> 2.45.2
>
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] dt-bindings: mfd: mediatek,mt6357: Fixup reference to pwrap node
2024-08-26 15:50 ` Conor Dooley
@ 2024-08-26 16:07 ` Krzysztof Kozlowski
2024-08-30 11:25 ` Macpaul Lin
1 sibling, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2024-08-26 16:07 UTC (permalink / raw)
To: Conor Dooley, Macpaul Lin
Cc: AngeloGioacchino Del Regno, Matthias Brugger, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Alexandre Mergnat,
Flora Fu, Bear Wang, Pablo Sun, Macpaul Lin, Sen Chu,
Chris-qj chen, MediaTek Chromebook Upstream, linux-kernel,
linux-arm-kernel, linux-mediatek, devicetree, Chen-Yu Tsai
On 26/08/2024 17:50, Conor Dooley wrote:
> On Mon, Aug 26, 2024 at 02:54:15PM +0800, Macpaul Lin wrote:
>> The mt6357 is a subnode of pwrap node. Previously, the documentation
>> only included a note in the description of mt6357. This change adds the
>> appropriate $ref for pwrap to ensure clarity and correctness.
>
> I think this change is wrong and the existing binding is fine.
> Adding the ref overcomplicates the binding completely, and stating that
> this is a child node of another device is sufficient.
>
> Instead, if anything, the pwrap binding should have a ref to /this/
> binding.
Yes or list allowed compatibles for child node.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] dt-bindings: mfd: mediatek,mt6357: Fixup reference to pwrap node
2024-08-26 15:50 ` Conor Dooley
2024-08-26 16:07 ` Krzysztof Kozlowski
@ 2024-08-30 11:25 ` Macpaul Lin
1 sibling, 0 replies; 5+ messages in thread
From: Macpaul Lin @ 2024-08-30 11:25 UTC (permalink / raw)
To: Conor Dooley
Cc: AngeloGioacchino Del Regno, Matthias Brugger, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Lee Jones, Alexandre Mergnat,
Flora Fu, Bear Wang, Pablo Sun, Macpaul Lin, Sen Chu,
Chris-qj chen, MediaTek Chromebook Upstream, linux-kernel,
linux-arm-kernel, linux-mediatek, devicetree, Chen-Yu Tsai
On 8/26/24 23:50, Conor Dooley wrote:
> On Mon, Aug 26, 2024 at 02:54:15PM +0800, Macpaul Lin wrote:
>> The mt6357 is a subnode of pwrap node. Previously, the documentation
>> only included a note in the description of mt6357. This change adds the
>> appropriate $ref for pwrap to ensure clarity and correctness.
>
> I think this change is wrong and the existing binding is fine.
> Adding the ref overcomplicates the binding completely, and stating that
> this is a child node of another device is sufficient.
>
> Instead, if anything, the pwrap binding should have a ref to /this/
> binding.
>
> Thanks,
> Conor.
Thanks for the clarification of this parent-child relationship of the
binding. Will apply to further conversion tasks.
There are many PMIC devices belongs to the pwrap bindings. Hope I'll
have time to fix this soon.
>>
>> $ref: /schemas/soc/mediatek/mediatek,pwrap.yaml
>>
>> Additionally, the indentation for the pmic section has been adjusted
>> to match the corresponding structure.
Best regards,
Macpaul Lin
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-08-30 11:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-26 6:54 [PATCH] dt-bindings: mfd: mediatek,mt6357: Fixup reference to pwrap node Macpaul Lin
2024-08-26 15:45 ` Krzysztof Kozlowski
2024-08-26 15:50 ` Conor Dooley
2024-08-26 16:07 ` Krzysztof Kozlowski
2024-08-30 11:25 ` Macpaul Lin
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).