2021-03-12 14:57:49

by Matthias Brugger

[permalink] [raw]
Subject: [PATCH 1/7] dt-bindings: mfd: mediatek: Fix regulator description

From: Matthias Brugger <[email protected]>

Having a separate compatible for the regulator node is redundant and not
needed. Delete the corresponding requierement.

Signed-off-by: Matthias Brugger <[email protected]>
---

Documentation/devicetree/bindings/mfd/mt6397.txt | 3 ---
1 file changed, 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/mfd/mt6397.txt b/Documentation/devicetree/bindings/mfd/mt6397.txt
index 2661775a38251..28a69728e6fe2 100644
--- a/Documentation/devicetree/bindings/mfd/mt6397.txt
+++ b/Documentation/devicetree/bindings/mfd/mt6397.txt
@@ -33,11 +33,8 @@ Optional subnodes:
For details, see ../rtc/rtc-mt6397.txt
- regulators
Required properties:
- - compatible: "mediatek,mt6323-regulator"
see ../regulator/mt6323-regulator.txt
- - compatible: "mediatek,mt6358-regulator"
see ../regulator/mt6358-regulator.txt
- - compatible: "mediatek,mt6397-regulator"
see ../regulator/mt6397-regulator.txt
- codec
Required properties:
--
2.30.1


2021-03-12 14:57:50

by Matthias Brugger

[permalink] [raw]
Subject: [PATCH 2/7] dt-bindigns: regulator: mtk: Drop unneeded compatible

From: Matthias Brugger <[email protected]>

The regulator does not need to have a device tree compatible, if it's
part of an MFD. We leave the node name to the SoC specific name (e.g.
mt6323regulator) to allow older kernels to work with the new binding.

Signed-off-by: Matthias Brugger <[email protected]>
---
.../bindings/regulator/mt6323-regulator.txt | 2 +-
.../bindings/regulator/mt6358-regulator.txt | 4 +---
.../bindings/regulator/mt6397-regulator.txt | 14 +++++---------
3 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/Documentation/devicetree/bindings/regulator/mt6323-regulator.txt b/Documentation/devicetree/bindings/regulator/mt6323-regulator.txt
index a48749db4df36..69f32e1a6702e 100644
--- a/Documentation/devicetree/bindings/regulator/mt6323-regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/mt6323-regulator.txt
@@ -19,7 +19,7 @@ LDO:
Example:

pmic: mt6323 {
- mt6323regulator: regulators {
+ mt6323regulator {
mt6323_vproc_reg: buck_vproc{
regulator-name = "vproc";
regulator-min-microvolt = < 700000>;
diff --git a/Documentation/devicetree/bindings/regulator/mt6358-regulator.txt b/Documentation/devicetree/bindings/regulator/mt6358-regulator.txt
index 9a90a92f2d7e1..ba1214da5bf7c 100644
--- a/Documentation/devicetree/bindings/regulator/mt6358-regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/mt6358-regulator.txt
@@ -23,9 +23,7 @@ Example:
pmic {
compatible = "mediatek,mt6358";

- mt6358regulator: mt6358regulator {
- compatible = "mediatek,mt6358-regulator";
-
+ mt6358regulator {
mt6358_vdram1_reg: buck_vdram1 {
regulator-compatible = "buck_vdram1";
regulator-name = "vdram1";
diff --git a/Documentation/devicetree/bindings/regulator/mt6397-regulator.txt b/Documentation/devicetree/bindings/regulator/mt6397-regulator.txt
index c080086d3e629..2b14362ac56e1 100644
--- a/Documentation/devicetree/bindings/regulator/mt6397-regulator.txt
+++ b/Documentation/devicetree/bindings/regulator/mt6397-regulator.txt
@@ -1,11 +1,9 @@
Mediatek MT6397 Regulator

-Required properties:
-- compatible: "mediatek,mt6397-regulator"
-- mt6397regulator: List of regulators provided by this controller. It is named
- according to its regulator type, buck_<name> and ldo_<name>.
- The definition for each of these nodes is defined using the standard binding
- for regulators at Documentation/devicetree/bindings/regulator/regulator.txt.
+List of regulators provided by this controller. It is named
+according to its regulator type, buck_<name> and ldo_<name>.
+The definition for each of these nodes is defined using the standard binding
+for regulators at Documentation/devicetree/bindings/regulator/regulator.txt.

The valid names for regulators are::
BUCK:
@@ -23,9 +21,7 @@ Example:
pmic {
compatible = "mediatek,mt6397";

- mt6397regulator: mt6397regulator {
- compatible = "mediatek,mt6397-regulator";
-
+ mt6397regulator {
mt6397_vpca15_reg: buck_vpca15 {
regulator-compatible = "buck_vpca15";
regulator-name = "vpca15";
--
2.30.1

2021-03-12 14:57:51

by Matthias Brugger

[permalink] [raw]
Subject: [PATCH 3/7] mfd: mt6397: Drop of_compatible for regulator

From: Matthias Brugger <[email protected]>

For regulators a compatible string is superfluous. Drop the string.

Signed-off-by: Matthias Brugger <[email protected]>
---
drivers/mfd/mt6397-core.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
index 7518d74c3b4c3..13037f4bc54e7 100644
--- a/drivers/mfd/mt6397-core.c
+++ b/drivers/mfd/mt6397-core.c
@@ -67,7 +67,6 @@ static const struct mfd_cell mt6323_devs[] = {
.of_compatible = "mediatek,mt6323-rtc",
}, {
.name = "mt6323-regulator",
- .of_compatible = "mediatek,mt6323-regulator"
}, {
.name = "mt6323-led",
.of_compatible = "mediatek,mt6323-led"
@@ -87,7 +86,6 @@ static const struct mfd_cell mt6323_devs[] = {
static const struct mfd_cell mt6358_devs[] = {
{
.name = "mt6358-regulator",
- .of_compatible = "mediatek,mt6358-regulator"
}, {
.name = "mt6358-rtc",
.num_resources = ARRAY_SIZE(mt6358_rtc_resources),
@@ -107,7 +105,6 @@ static const struct mfd_cell mt6397_devs[] = {
.of_compatible = "mediatek,mt6397-rtc",
}, {
.name = "mt6397-regulator",
- .of_compatible = "mediatek,mt6397-regulator",
}, {
.name = "mt6397-codec",
.of_compatible = "mediatek,mt6397-codec",
--
2.30.1

2021-03-12 14:58:17

by Matthias Brugger

[permalink] [raw]
Subject: [PATCH 5/7] arm: dts: mt6323: Drop OF compatible

From: Matthias Brugger <[email protected]>

The regulator framework does not need compatible, it's acutall
superfluous. Drop it from the DT.

Signed-off-by: Matthias Brugger <[email protected]>
---
arch/arm/boot/dts/mt6323.dtsi | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/mt6323.dtsi b/arch/arm/boot/dts/mt6323.dtsi
index 7fda40ab5fe83..d37f118a663a9 100644
--- a/arch/arm/boot/dts/mt6323.dtsi
+++ b/arch/arm/boot/dts/mt6323.dtsi
@@ -21,9 +21,7 @@ mt6323_leds: leds {
status = "disabled";
};

- mt6323regulator: mt6323regulator{
- compatible = "mediatek,mt6323-regulator";
-
+ mt6323regulator {
mt6323_vproc_reg: buck_vproc{
regulator-name = "vproc";
regulator-min-microvolt = < 700000>;
--
2.30.1

2021-03-12 14:59:56

by Matthias Brugger

[permalink] [raw]
Subject: [PATCH 4/7] regulator: mediatek: Add regulators_node to description

From: Matthias Brugger <[email protected]>

Define the regulator node under which the regulators are described.

Signed-off-by: Matthias Brugger <[email protected]>
---
drivers/regulator/mt6323-regulator.c | 3 +++
drivers/regulator/mt6358-regulator.c | 4 ++++
drivers/regulator/mt6397-regulator.c | 10 +++-------
3 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/drivers/regulator/mt6323-regulator.c b/drivers/regulator/mt6323-regulator.c
index ff9016170db37..8b22ded43ab8a 100644
--- a/drivers/regulator/mt6323-regulator.c
+++ b/drivers/regulator/mt6323-regulator.c
@@ -42,6 +42,7 @@ struct mt6323_regulator_info {
.desc = { \
.name = #vreg, \
.of_match = of_match_ptr(match), \
+ .regulators_node = of_match_ptr("mt6323regulator"), \
.ops = &mt6323_volt_range_ops, \
.type = REGULATOR_VOLTAGE, \
.id = MT6323_ID_##vreg, \
@@ -66,6 +67,7 @@ struct mt6323_regulator_info {
.desc = { \
.name = #vreg, \
.of_match = of_match_ptr(match), \
+ .regulators_node = of_match_ptr("mt6323regulator"), \
.ops = &mt6323_volt_table_ops, \
.type = REGULATOR_VOLTAGE, \
.id = MT6323_ID_##vreg, \
@@ -88,6 +90,7 @@ struct mt6323_regulator_info {
.desc = { \
.name = #vreg, \
.of_match = of_match_ptr(match), \
+ .regulators_node = of_match_ptr("mt6323regulator"), \
.ops = &mt6323_volt_fixed_ops, \
.type = REGULATOR_VOLTAGE, \
.id = MT6323_ID_##vreg, \
diff --git a/drivers/regulator/mt6358-regulator.c b/drivers/regulator/mt6358-regulator.c
index 13cb6ac9a8929..f5c478d7baaf2 100644
--- a/drivers/regulator/mt6358-regulator.c
+++ b/drivers/regulator/mt6358-regulator.c
@@ -44,6 +44,7 @@ struct mt6358_regulator_info {
.desc = { \
.name = #vreg, \
.of_match = of_match_ptr(match), \
+ .regulators_node = of_match_ptr("mt6358regulator"), \
.ops = &mt6358_volt_range_ops, \
.type = REGULATOR_VOLTAGE, \
.id = MT6358_ID_##vreg, \
@@ -74,6 +75,7 @@ struct mt6358_regulator_info {
.desc = { \
.name = #vreg, \
.of_match = of_match_ptr(match), \
+ .regulators_node = of_match_ptr("mt6358regulator"), \
.ops = &mt6358_volt_table_ops, \
.type = REGULATOR_VOLTAGE, \
.id = MT6358_ID_##vreg, \
@@ -99,6 +101,7 @@ struct mt6358_regulator_info {
.desc = { \
.name = #vreg, \
.of_match = of_match_ptr(match), \
+ .regulators_node = of_match_ptr("mt6358regulator"), \
.ops = &mt6358_volt_range_ops, \
.type = REGULATOR_VOLTAGE, \
.id = MT6358_ID_##vreg, \
@@ -124,6 +127,7 @@ struct mt6358_regulator_info {
.desc = { \
.name = #vreg, \
.of_match = of_match_ptr(match), \
+ .regulators_node = of_match_ptr("mt6358regulator"), \
.ops = &mt6358_volt_fixed_ops, \
.type = REGULATOR_VOLTAGE, \
.id = MT6358_ID_##vreg, \
diff --git a/drivers/regulator/mt6397-regulator.c b/drivers/regulator/mt6397-regulator.c
index 0a30df5e414fc..9e8589f773eaa 100644
--- a/drivers/regulator/mt6397-regulator.c
+++ b/drivers/regulator/mt6397-regulator.c
@@ -42,6 +42,7 @@ struct mt6397_regulator_info {
.desc = { \
.name = #vreg, \
.of_match = of_match_ptr(match), \
+ .regulators_node = of_match_ptr("mt6397regulator"), \
.ops = &mt6397_volt_range_ops, \
.type = REGULATOR_VOLTAGE, \
.id = MT6397_ID_##vreg, \
@@ -70,6 +71,7 @@ struct mt6397_regulator_info {
.desc = { \
.name = #vreg, \
.of_match = of_match_ptr(match), \
+ .regulators_node = of_match_ptr("mt6397regulator"), \
.ops = &mt6397_volt_table_ops, \
.type = REGULATOR_VOLTAGE, \
.id = MT6397_ID_##vreg, \
@@ -89,6 +91,7 @@ struct mt6397_regulator_info {
.desc = { \
.name = #vreg, \
.of_match = of_match_ptr(match), \
+ .regulators_node = of_match_ptr("mt6397regulator"), \
.ops = &mt6397_volt_fixed_ops, \
.type = REGULATOR_VOLTAGE, \
.id = MT6397_ID_##vreg, \
@@ -396,16 +399,9 @@ static const struct platform_device_id mt6397_platform_ids[] = {
};
MODULE_DEVICE_TABLE(platform, mt6397_platform_ids);

-static const struct of_device_id mt6397_of_match[] = {
- { .compatible = "mediatek,mt6397-regulator", },
- { /* sentinel */ },
-};
-MODULE_DEVICE_TABLE(of, mt6397_of_match);
-
static struct platform_driver mt6397_regulator_driver = {
.driver = {
.name = "mt6397-regulator",
- .of_match_table = of_match_ptr(mt6397_of_match),
},
.probe = mt6397_regulator_probe,
.id_table = mt6397_platform_ids,
--
2.30.1

2021-03-12 15:00:29

by Matthias Brugger

[permalink] [raw]
Subject: [PATCH 7/7] arm64: dts: mt8173: Drop compatible for mt6397

From: Matthias Brugger <[email protected]>

The regulator framework does not need compatible, it's actually
superfluous. Drop it from the DT.

Signed-off-by: Matthias Brugger <[email protected]>

Series-to: [email protected]
Series-to: [email protected]
Series-to: [email protected]
Series-to: [email protected]
Series-to: [email protected]
Series-cc: [email protected]
Series-cc: [email protected]
Series-cc: [email protected]
Series-cc: [email protected]
---
arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi | 4 +---
arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 4 +---
2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi b/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi
index 21452c51a20a8..db06a986f763e 100644
--- a/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi
@@ -916,9 +916,7 @@ pio6397: pinctrl {
#gpio-cells = <2>;
};

- regulator: mt6397regulator {
- compatible = "mediatek,mt6397-regulator";
-
+ mt6397regulator {
mt6397_vpca15_reg: buck_vpca15 {
regulator-compatible = "buck_vpca15";
regulator-name = "vpca15";
diff --git a/arch/arm64/boot/dts/mediatek/mt8173-evb.dts b/arch/arm64/boot/dts/mediatek/mt8173-evb.dts
index 6dffada2e66b4..c3f2a85d55fe7 100644
--- a/arch/arm64/boot/dts/mediatek/mt8173-evb.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8173-evb.dts
@@ -303,9 +303,7 @@ pmic: mt6397 {
interrupt-controller;
#interrupt-cells = <2>;

- mt6397regulator: mt6397regulator {
- compatible = "mediatek,mt6397-regulator";
-
+ mt6397regulator {
mt6397_vpca15_reg: buck_vpca15 {
regulator-compatible = "buck_vpca15";
regulator-name = "vpca15";
--
2.30.1

2021-03-12 15:00:44

by Matthias Brugger

[permalink] [raw]
Subject: [PATCH 6/7] arm64: dts: mt6358: Drop compatible for regulators

From: Matthias Brugger <[email protected]>

The regulator framework does not need compatible, it's actually
superfluous. Drop it from the DT.

Signed-off-by: Matthias Brugger <[email protected]>
---
arch/arm64/boot/dts/mediatek/mt6358.dtsi | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/mediatek/mt6358.dtsi b/arch/arm64/boot/dts/mediatek/mt6358.dtsi
index fa159b20379e4..e423feac0bc2e 100644
--- a/arch/arm64/boot/dts/mediatek/mt6358.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt6358.dtsi
@@ -15,9 +15,7 @@ mt6358codec: mt6358codec {
compatible = "mediatek,mt6358-sound";
};

- mt6358regulator: mt6358regulator {
- compatible = "mediatek,mt6358-regulator";
-
+ mt6358regulator {
mt6358_vdram1_reg: buck_vdram1 {
regulator-name = "vdram1";
regulator-min-microvolt = <500000>;
--
2.30.1

2021-03-18 13:32:49

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 4/7] regulator: mediatek: Add regulators_node to description

On Fri, Mar 12, 2021 at 03:55:42PM +0100, [email protected] wrote:
> From: Matthias Brugger <[email protected]>
>
> Define the regulator node under which the regulators are described.

Acked-by: Mark Brown <[email protected]>


Attachments:
(No filename) (240.00 B)
signature.asc (499.00 B)
Download all attachments

2021-03-18 14:17:52

by Enric Balletbo Serra

[permalink] [raw]
Subject: Re: [PATCH 7/7] arm64: dts: mt8173: Drop compatible for mt6397

Hi Matthias,

Thank you for your patch.

Missatge de l'adreça <[email protected]> del dia dv., 12 de març
2021 a les 15:57:
>
> From: Matthias Brugger <[email protected]>
>
> The regulator framework does not need compatible, it's actually
> superfluous. Drop it from the DT.
>
> Signed-off-by: Matthias Brugger <[email protected]>
>
> Series-to: [email protected]
> Series-to: [email protected]
> Series-to: [email protected]
> Series-to: [email protected]
> Series-to: [email protected]
> Series-cc: [email protected]
> Series-cc: [email protected]
> Series-cc: [email protected]
> Series-cc: [email protected]
> ---
> arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi | 4 +---
> arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 4 +---
> 2 files changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi b/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi
> index 21452c51a20a8..db06a986f763e 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi
> @@ -916,9 +916,7 @@ pio6397: pinctrl {
> #gpio-cells = <2>;
> };
>
> - regulator: mt6397regulator {
> - compatible = "mediatek,mt6397-regulator";
> -
> + mt6397regulator {

The same happens here, it is not checked because the mt6397 is not in
YAML format yet, but once we do this it'll trigger an error as the
node name should be 'regulators'


> mt6397_vpca15_reg: buck_vpca15 {
> regulator-compatible = "buck_vpca15";
> regulator-name = "vpca15";
> diff --git a/arch/arm64/boot/dts/mediatek/mt8173-evb.dts b/arch/arm64/boot/dts/mediatek/mt8173-evb.dts
> index 6dffada2e66b4..c3f2a85d55fe7 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8173-evb.dts
> +++ b/arch/arm64/boot/dts/mediatek/mt8173-evb.dts
> @@ -303,9 +303,7 @@ pmic: mt6397 {
> interrupt-controller;
> #interrupt-cells = <2>;
>
> - mt6397regulator: mt6397regulator {
> - compatible = "mediatek,mt6397-regulator";
> -
> + mt6397regulator {
> mt6397_vpca15_reg: buck_vpca15 {
> regulator-compatible = "buck_vpca15";
> regulator-name = "vpca15";
> --
> 2.30.1
>
>
> _______________________________________________
> Linux-mediatek mailing list
> [email protected]
> http://lists.infradead.org/mailman/listinfo/linux-mediatek

2021-03-18 14:19:00

by Enric Balletbo Serra

[permalink] [raw]
Subject: Re: [PATCH 2/7] dt-bindigns: regulator: mtk: Drop unneeded compatible

Hi Matthias,

Thank you for your patch. There is a typo in the subject line
s/dt-bindigns/dt-bindings/ Rob might miss this patch as he filters the
patches by subject I guess.

Missatge de l'adreça <[email protected]> del dia dv., 12 de març
2021 a les 15:57:
>
> From: Matthias Brugger <[email protected]>
>
> The regulator does not need to have a device tree compatible, if it's
> part of an MFD. We leave the node name to the SoC specific name (e.g.
> mt6323regulator) to allow older kernels to work with the new binding.
>
> Signed-off-by: Matthias Brugger <[email protected]>
> ---
> .../bindings/regulator/mt6323-regulator.txt | 2 +-
> .../bindings/regulator/mt6358-regulator.txt | 4 +---
> .../bindings/regulator/mt6397-regulator.txt | 14 +++++---------
> 3 files changed, 7 insertions(+), 13 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/regulator/mt6323-regulator.txt b/Documentation/devicetree/bindings/regulator/mt6323-regulator.txt
> index a48749db4df36..69f32e1a6702e 100644
> --- a/Documentation/devicetree/bindings/regulator/mt6323-regulator.txt
> +++ b/Documentation/devicetree/bindings/regulator/mt6323-regulator.txt
> @@ -19,7 +19,7 @@ LDO:
> Example:
>
> pmic: mt6323 {
> - mt6323regulator: regulators {
> + mt6323regulator {

If you convert this binding to YAML, you'll probably get a review that
the node name must be just 'regulators' here. And then, looking at the
other patches something will break I guess ...

> mt6323_vproc_reg: buck_vproc{
> regulator-name = "vproc";
> regulator-min-microvolt = < 700000>;
> diff --git a/Documentation/devicetree/bindings/regulator/mt6358-regulator.txt b/Documentation/devicetree/bindings/regulator/mt6358-regulator.txt
> index 9a90a92f2d7e1..ba1214da5bf7c 100644
> --- a/Documentation/devicetree/bindings/regulator/mt6358-regulator.txt
> +++ b/Documentation/devicetree/bindings/regulator/mt6358-regulator.txt
> @@ -23,9 +23,7 @@ Example:
> pmic {
> compatible = "mediatek,mt6358";
>
> - mt6358regulator: mt6358regulator {
> - compatible = "mediatek,mt6358-regulator";
> -
> + mt6358regulator {
> mt6358_vdram1_reg: buck_vdram1 {
> regulator-compatible = "buck_vdram1";
> regulator-name = "vdram1";
> diff --git a/Documentation/devicetree/bindings/regulator/mt6397-regulator.txt b/Documentation/devicetree/bindings/regulator/mt6397-regulator.txt
> index c080086d3e629..2b14362ac56e1 100644
> --- a/Documentation/devicetree/bindings/regulator/mt6397-regulator.txt
> +++ b/Documentation/devicetree/bindings/regulator/mt6397-regulator.txt
> @@ -1,11 +1,9 @@
> Mediatek MT6397 Regulator
>
> -Required properties:
> -- compatible: "mediatek,mt6397-regulator"
> -- mt6397regulator: List of regulators provided by this controller. It is named
> - according to its regulator type, buck_<name> and ldo_<name>.
> - The definition for each of these nodes is defined using the standard binding
> - for regulators at Documentation/devicetree/bindings/regulator/regulator.txt.
> +List of regulators provided by this controller. It is named
> +according to its regulator type, buck_<name> and ldo_<name>.
> +The definition for each of these nodes is defined using the standard binding
> +for regulators at Documentation/devicetree/bindings/regulator/regulator.txt.
>
> The valid names for regulators are::
> BUCK:
> @@ -23,9 +21,7 @@ Example:
> pmic {
> compatible = "mediatek,mt6397";
>
> - mt6397regulator: mt6397regulator {
> - compatible = "mediatek,mt6397-regulator";
> -
> + mt6397regulator {
> mt6397_vpca15_reg: buck_vpca15 {
> regulator-compatible = "buck_vpca15";
> regulator-name = "vpca15";
> --
> 2.30.1
>
>
> _______________________________________________
> Linux-mediatek mailing list
> [email protected]
> http://lists.infradead.org/mailman/listinfo/linux-mediatek

2021-03-23 09:07:15

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 3/7] mfd: mt6397: Drop of_compatible for regulator

On Fri, 12 Mar 2021, [email protected] wrote:

> From: Matthias Brugger <[email protected]>
>
> For regulators a compatible string is superfluous. Drop the string.
>
> Signed-off-by: Matthias Brugger <[email protected]>
> ---
> drivers/mfd/mt6397-core.c | 3 ---
> 1 file changed, 3 deletions(-)

Acked-by: Lee Jones <[email protected]>

--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

2021-03-24 16:15:05

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 1/7] dt-bindings: mfd: mediatek: Fix regulator description

On Fri, 12 Mar 2021 15:55:39 +0100, [email protected] wrote:
> From: Matthias Brugger <[email protected]>
>
> Having a separate compatible for the regulator node is redundant and not
> needed. Delete the corresponding requierement.
>
> Signed-off-by: Matthias Brugger <[email protected]>
> ---
>
> Documentation/devicetree/bindings/mfd/mt6397.txt | 3 ---
> 1 file changed, 3 deletions(-)
>

Acked-by: Rob Herring <[email protected]>

2021-03-24 16:21:15

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 2/7] dt-bindigns: regulator: mtk: Drop unneeded compatible

On Thu, Mar 18, 2021 at 03:11:56PM +0100, Enric Balletbo Serra wrote:
> Hi Matthias,
>
> Thank you for your patch. There is a typo in the subject line
> s/dt-bindigns/dt-bindings/ Rob might miss this patch as he filters the
> patches by subject I guess.

I should, then I'd have a lot less to review...

>
> Missatge de l'adre?a <[email protected]> del dia dv., 12 de mar?
> 2021 a les 15:57:
> >
> > From: Matthias Brugger <[email protected]>
> >
> > The regulator does not need to have a device tree compatible, if it's
> > part of an MFD. We leave the node name to the SoC specific name (e.g.
> > mt6323regulator) to allow older kernels to work with the new binding.
> >
> > Signed-off-by: Matthias Brugger <[email protected]>
> > ---
> > .../bindings/regulator/mt6323-regulator.txt | 2 +-
> > .../bindings/regulator/mt6358-regulator.txt | 4 +---
> > .../bindings/regulator/mt6397-regulator.txt | 14 +++++---------
> > 3 files changed, 7 insertions(+), 13 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/regulator/mt6323-regulator.txt b/Documentation/devicetree/bindings/regulator/mt6323-regulator.txt
> > index a48749db4df36..69f32e1a6702e 100644
> > --- a/Documentation/devicetree/bindings/regulator/mt6323-regulator.txt
> > +++ b/Documentation/devicetree/bindings/regulator/mt6323-regulator.txt
> > @@ -19,7 +19,7 @@ LDO:
> > Example:
> >
> > pmic: mt6323 {

This one is wrong...

> > - mt6323regulator: regulators {
> > + mt6323regulator {

And this was right.

>
> If you convert this binding to YAML, you'll probably get a review that
> the node name must be just 'regulators' here. And then, looking at the
> other patches something will break I guess ...
>
> > mt6323_vproc_reg: buck_vproc{
> > regulator-name = "vproc";
> > regulator-min-microvolt = < 700000>;
> > diff --git a/Documentation/devicetree/bindings/regulator/mt6358-regulator.txt b/Documentation/devicetree/bindings/regulator/mt6358-regulator.txt
> > index 9a90a92f2d7e1..ba1214da5bf7c 100644
> > --- a/Documentation/devicetree/bindings/regulator/mt6358-regulator.txt
> > +++ b/Documentation/devicetree/bindings/regulator/mt6358-regulator.txt
> > @@ -23,9 +23,7 @@ Example:
> > pmic {
> > compatible = "mediatek,mt6358";
> >
> > - mt6358regulator: mt6358regulator {
> > - compatible = "mediatek,mt6358-regulator";
> > -
> > + mt6358regulator {
> > mt6358_vdram1_reg: buck_vdram1 {
> > regulator-compatible = "buck_vdram1";
> > regulator-name = "vdram1";
> > diff --git a/Documentation/devicetree/bindings/regulator/mt6397-regulator.txt b/Documentation/devicetree/bindings/regulator/mt6397-regulator.txt
> > index c080086d3e629..2b14362ac56e1 100644
> > --- a/Documentation/devicetree/bindings/regulator/mt6397-regulator.txt
> > +++ b/Documentation/devicetree/bindings/regulator/mt6397-regulator.txt
> > @@ -1,11 +1,9 @@
> > Mediatek MT6397 Regulator
> >
> > -Required properties:
> > -- compatible: "mediatek,mt6397-regulator"
> > -- mt6397regulator: List of regulators provided by this controller. It is named
> > - according to its regulator type, buck_<name> and ldo_<name>.
> > - The definition for each of these nodes is defined using the standard binding
> > - for regulators at Documentation/devicetree/bindings/regulator/regulator.txt.
> > +List of regulators provided by this controller. It is named
> > +according to its regulator type, buck_<name> and ldo_<name>.
> > +The definition for each of these nodes is defined using the standard binding
> > +for regulators at Documentation/devicetree/bindings/regulator/regulator.txt.
> >
> > The valid names for regulators are::
> > BUCK:
> > @@ -23,9 +21,7 @@ Example:
> > pmic {
> > compatible = "mediatek,mt6397";
> >
> > - mt6397regulator: mt6397regulator {
> > - compatible = "mediatek,mt6397-regulator";
> > -
> > + mt6397regulator {
> > mt6397_vpca15_reg: buck_vpca15 {
> > regulator-compatible = "buck_vpca15";
> > regulator-name = "vpca15";
> > --
> > 2.30.1
> >
> >
> > _______________________________________________
> > Linux-mediatek mailing list
> > [email protected]
> > http://lists.infradead.org/mailman/listinfo/linux-mediatek