All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/3] regulator: mt6360: Add OF match table
@ 2021-01-09 11:26 ` matthias.bgg
  0 siblings, 0 replies; 39+ messages in thread
From: matthias.bgg @ 2021-01-09 11:26 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown
  Cc: Hsin-Hsiung Wang, Axel Lin, Chen Zhong, Gene Chen, linux-kernel,
	linux-mediatek, linux-arm-kernel, Matthias Brugger,
	Matti Vaittinen, Matthias Brugger

From: Matthias Brugger <mbrugger@suse.com>

Binding documentation mentions that a compatible is required for the
MT6360 device node, but the driver doesn't provide a OF match table.

Fixes: d321571d5e4c ("regulator: mt6360: Add support for MT6360 regulator")
Signed-off-by: Matthias Brugger <mbrugger@suse.com>

---

Changes in v2:
- check for CONFIG_OF
- add Fixes tag

 drivers/regulator/mt6360-regulator.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/regulator/mt6360-regulator.c b/drivers/regulator/mt6360-regulator.c
index 15308ee29c13..f7b2514feabf 100644
--- a/drivers/regulator/mt6360-regulator.c
+++ b/drivers/regulator/mt6360-regulator.c
@@ -445,9 +445,18 @@ static const struct platform_device_id mt6360_regulator_id_table[] = {
 };
 MODULE_DEVICE_TABLE(platform, mt6360_regulator_id_table);
 
+#ifdef CONFIG_OF
+static const struct of_device_id mt6360_of_match[] = {
+	{ .compatible = "mediatek,mt6360-regulator", },
+	{ /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, mt6360_of_match);
+#endif
+
 static struct platform_driver mt6360_regulator_driver = {
 	.driver = {
 		.name = "mt6360-regulator",
+		.of_match_table = of_match_ptr(mt6360_of_match),
 	},
 	.probe = mt6360_regulator_probe,
 	.id_table = mt6360_regulator_id_table,
-- 
2.29.2


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

* [PATCH v2 1/3] regulator: mt6360: Add OF match table
@ 2021-01-09 11:26 ` matthias.bgg
  0 siblings, 0 replies; 39+ messages in thread
From: matthias.bgg @ 2021-01-09 11:26 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown
  Cc: Gene Chen, Matthias Brugger, Axel Lin, Matti Vaittinen,
	linux-kernel, linux-mediatek, linux-arm-kernel, Matthias Brugger,
	Chen Zhong, Hsin-Hsiung Wang

From: Matthias Brugger <mbrugger@suse.com>

Binding documentation mentions that a compatible is required for the
MT6360 device node, but the driver doesn't provide a OF match table.

Fixes: d321571d5e4c ("regulator: mt6360: Add support for MT6360 regulator")
Signed-off-by: Matthias Brugger <mbrugger@suse.com>

---

Changes in v2:
- check for CONFIG_OF
- add Fixes tag

 drivers/regulator/mt6360-regulator.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/regulator/mt6360-regulator.c b/drivers/regulator/mt6360-regulator.c
index 15308ee29c13..f7b2514feabf 100644
--- a/drivers/regulator/mt6360-regulator.c
+++ b/drivers/regulator/mt6360-regulator.c
@@ -445,9 +445,18 @@ static const struct platform_device_id mt6360_regulator_id_table[] = {
 };
 MODULE_DEVICE_TABLE(platform, mt6360_regulator_id_table);
 
+#ifdef CONFIG_OF
+static const struct of_device_id mt6360_of_match[] = {
+	{ .compatible = "mediatek,mt6360-regulator", },
+	{ /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, mt6360_of_match);
+#endif
+
 static struct platform_driver mt6360_regulator_driver = {
 	.driver = {
 		.name = "mt6360-regulator",
+		.of_match_table = of_match_ptr(mt6360_of_match),
 	},
 	.probe = mt6360_regulator_probe,
 	.id_table = mt6360_regulator_id_table,
-- 
2.29.2


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* [PATCH v2 1/3] regulator: mt6360: Add OF match table
@ 2021-01-09 11:26 ` matthias.bgg
  0 siblings, 0 replies; 39+ messages in thread
From: matthias.bgg @ 2021-01-09 11:26 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown
  Cc: Gene Chen, Matthias Brugger, Axel Lin, Matti Vaittinen,
	linux-kernel, linux-mediatek, linux-arm-kernel, Matthias Brugger,
	Chen Zhong, Hsin-Hsiung Wang

From: Matthias Brugger <mbrugger@suse.com>

Binding documentation mentions that a compatible is required for the
MT6360 device node, but the driver doesn't provide a OF match table.

Fixes: d321571d5e4c ("regulator: mt6360: Add support for MT6360 regulator")
Signed-off-by: Matthias Brugger <mbrugger@suse.com>

---

Changes in v2:
- check for CONFIG_OF
- add Fixes tag

 drivers/regulator/mt6360-regulator.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/regulator/mt6360-regulator.c b/drivers/regulator/mt6360-regulator.c
index 15308ee29c13..f7b2514feabf 100644
--- a/drivers/regulator/mt6360-regulator.c
+++ b/drivers/regulator/mt6360-regulator.c
@@ -445,9 +445,18 @@ static const struct platform_device_id mt6360_regulator_id_table[] = {
 };
 MODULE_DEVICE_TABLE(platform, mt6360_regulator_id_table);
 
+#ifdef CONFIG_OF
+static const struct of_device_id mt6360_of_match[] = {
+	{ .compatible = "mediatek,mt6360-regulator", },
+	{ /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, mt6360_of_match);
+#endif
+
 static struct platform_driver mt6360_regulator_driver = {
 	.driver = {
 		.name = "mt6360-regulator",
+		.of_match_table = of_match_ptr(mt6360_of_match),
 	},
 	.probe = mt6360_regulator_probe,
 	.id_table = mt6360_regulator_id_table,
-- 
2.29.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v2 2/3] regulator: mt6358: Add OF match table
  2021-01-09 11:26 ` matthias.bgg
  (?)
@ 2021-01-09 11:26   ` matthias.bgg
  -1 siblings, 0 replies; 39+ messages in thread
From: matthias.bgg @ 2021-01-09 11:26 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown
  Cc: Hsin-Hsiung Wang, Axel Lin, Chen Zhong, Gene Chen, linux-kernel,
	linux-mediatek, linux-arm-kernel, Matthias Brugger,
	Matti Vaittinen, Matthias Brugger

From: Matthias Brugger <mbrugger@suse.com>

The binding documentation mentions that a compatible is required for the
MT6358 device node. But the driver does not provide a OF match table.
This way auto-loading is broken as the MFD driver that registers the
device has a .of_compatible set which makes the platform .uevent
callback report a OF modalias, but that's not in the module.

Fixes: f67ff1bd58f0 ("regulator: mt6358: Add support for MT6358 regulator")
Signed-off-by: Matthias Brugger <mbrugger@suse.com>

---

Changes in v2:
- check for CONFIG_OF
- add Fixes tag

 drivers/regulator/mt6358-regulator.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/regulator/mt6358-regulator.c b/drivers/regulator/mt6358-regulator.c
index 13cb6ac9a892..a4ed19a54ec6 100644
--- a/drivers/regulator/mt6358-regulator.c
+++ b/drivers/regulator/mt6358-regulator.c
@@ -534,9 +534,18 @@ static const struct platform_device_id mt6358_platform_ids[] = {
 };
 MODULE_DEVICE_TABLE(platform, mt6358_platform_ids);
 
+#ifdef CONFIG_OF
+static const struct of_device_id mt6358_of_match[] = {
+	{ .compatible = "mediatek,mt6358-regulator", },
+	{ /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, mt6358_of_match);
+#endif
+
 static struct platform_driver mt6358_regulator_driver = {
 	.driver = {
 		.name = "mt6358-regulator",
+		.of_match_table = of_match_ptr(mt6358_of_match),
 	},
 	.probe = mt6358_regulator_probe,
 	.id_table = mt6358_platform_ids,
-- 
2.29.2


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

* [PATCH v2 2/3] regulator: mt6358: Add OF match table
@ 2021-01-09 11:26   ` matthias.bgg
  0 siblings, 0 replies; 39+ messages in thread
From: matthias.bgg @ 2021-01-09 11:26 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown
  Cc: Gene Chen, Matthias Brugger, Axel Lin, Matti Vaittinen,
	linux-kernel, linux-mediatek, linux-arm-kernel, Matthias Brugger,
	Chen Zhong, Hsin-Hsiung Wang

From: Matthias Brugger <mbrugger@suse.com>

The binding documentation mentions that a compatible is required for the
MT6358 device node. But the driver does not provide a OF match table.
This way auto-loading is broken as the MFD driver that registers the
device has a .of_compatible set which makes the platform .uevent
callback report a OF modalias, but that's not in the module.

Fixes: f67ff1bd58f0 ("regulator: mt6358: Add support for MT6358 regulator")
Signed-off-by: Matthias Brugger <mbrugger@suse.com>

---

Changes in v2:
- check for CONFIG_OF
- add Fixes tag

 drivers/regulator/mt6358-regulator.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/regulator/mt6358-regulator.c b/drivers/regulator/mt6358-regulator.c
index 13cb6ac9a892..a4ed19a54ec6 100644
--- a/drivers/regulator/mt6358-regulator.c
+++ b/drivers/regulator/mt6358-regulator.c
@@ -534,9 +534,18 @@ static const struct platform_device_id mt6358_platform_ids[] = {
 };
 MODULE_DEVICE_TABLE(platform, mt6358_platform_ids);
 
+#ifdef CONFIG_OF
+static const struct of_device_id mt6358_of_match[] = {
+	{ .compatible = "mediatek,mt6358-regulator", },
+	{ /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, mt6358_of_match);
+#endif
+
 static struct platform_driver mt6358_regulator_driver = {
 	.driver = {
 		.name = "mt6358-regulator",
+		.of_match_table = of_match_ptr(mt6358_of_match),
 	},
 	.probe = mt6358_regulator_probe,
 	.id_table = mt6358_platform_ids,
-- 
2.29.2


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* [PATCH v2 2/3] regulator: mt6358: Add OF match table
@ 2021-01-09 11:26   ` matthias.bgg
  0 siblings, 0 replies; 39+ messages in thread
From: matthias.bgg @ 2021-01-09 11:26 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown
  Cc: Gene Chen, Matthias Brugger, Axel Lin, Matti Vaittinen,
	linux-kernel, linux-mediatek, linux-arm-kernel, Matthias Brugger,
	Chen Zhong, Hsin-Hsiung Wang

From: Matthias Brugger <mbrugger@suse.com>

The binding documentation mentions that a compatible is required for the
MT6358 device node. But the driver does not provide a OF match table.
This way auto-loading is broken as the MFD driver that registers the
device has a .of_compatible set which makes the platform .uevent
callback report a OF modalias, but that's not in the module.

Fixes: f67ff1bd58f0 ("regulator: mt6358: Add support for MT6358 regulator")
Signed-off-by: Matthias Brugger <mbrugger@suse.com>

---

Changes in v2:
- check for CONFIG_OF
- add Fixes tag

 drivers/regulator/mt6358-regulator.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/regulator/mt6358-regulator.c b/drivers/regulator/mt6358-regulator.c
index 13cb6ac9a892..a4ed19a54ec6 100644
--- a/drivers/regulator/mt6358-regulator.c
+++ b/drivers/regulator/mt6358-regulator.c
@@ -534,9 +534,18 @@ static const struct platform_device_id mt6358_platform_ids[] = {
 };
 MODULE_DEVICE_TABLE(platform, mt6358_platform_ids);
 
+#ifdef CONFIG_OF
+static const struct of_device_id mt6358_of_match[] = {
+	{ .compatible = "mediatek,mt6358-regulator", },
+	{ /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, mt6358_of_match);
+#endif
+
 static struct platform_driver mt6358_regulator_driver = {
 	.driver = {
 		.name = "mt6358-regulator",
+		.of_match_table = of_match_ptr(mt6358_of_match),
 	},
 	.probe = mt6358_regulator_probe,
 	.id_table = mt6358_platform_ids,
-- 
2.29.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v2 3/3] regulator: mt6323: Add OF match table
  2021-01-09 11:26 ` matthias.bgg
  (?)
@ 2021-01-09 11:26   ` matthias.bgg
  -1 siblings, 0 replies; 39+ messages in thread
From: matthias.bgg @ 2021-01-09 11:26 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown
  Cc: Hsin-Hsiung Wang, Axel Lin, Chen Zhong, Gene Chen, linux-kernel,
	linux-mediatek, linux-arm-kernel, Matthias Brugger,
	Matti Vaittinen, Matthias Brugger, John Crispin

From: Matthias Brugger <mbrugger@suse.com>

The binding documentation mentions that a compatible is required for the
MT6323 device node. But the driver does not provide a OF match table.
This way auto-loading is broken as the MFD driver that registers the
device has a .of_compatible set which makes the platform .uevent
callback report a OF modalias, but that's not in the module.

Fixes: 2fdf82923618 ("regulator: mt6323: Add support for MT6323 regulator")
Signed-off-by: Matthias Brugger <mbrugger@suse.com>

---

Changes in v2:
- check for CONFIG_OF
- add Fixes tag

 drivers/regulator/mt6323-regulator.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/regulator/mt6323-regulator.c b/drivers/regulator/mt6323-regulator.c
index ff9016170db3..646742d4db74 100644
--- a/drivers/regulator/mt6323-regulator.c
+++ b/drivers/regulator/mt6323-regulator.c
@@ -406,9 +406,18 @@ static const struct platform_device_id mt6323_platform_ids[] = {
 };
 MODULE_DEVICE_TABLE(platform, mt6323_platform_ids);
 
+#ifdef CONFIG_OF
+static const struct of_device_id mt6323_of_match[] = {
+	{ .compatible = "mediatek,mt6323-regulator", },
+	{ /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, mt6323_of_match);
+#endif
+
 static struct platform_driver mt6323_regulator_driver = {
 	.driver = {
 		.name = "mt6323-regulator",
+		.of_match_table = of_match_ptr(mt6323_of_match),
 	},
 	.probe = mt6323_regulator_probe,
 	.id_table = mt6323_platform_ids,
-- 
2.29.2


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

* [PATCH v2 3/3] regulator: mt6323: Add OF match table
@ 2021-01-09 11:26   ` matthias.bgg
  0 siblings, 0 replies; 39+ messages in thread
From: matthias.bgg @ 2021-01-09 11:26 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown
  Cc: Gene Chen, Matthias Brugger, Axel Lin, Matti Vaittinen,
	linux-kernel, linux-mediatek, linux-arm-kernel, John Crispin,
	Matthias Brugger, Chen Zhong, Hsin-Hsiung Wang

From: Matthias Brugger <mbrugger@suse.com>

The binding documentation mentions that a compatible is required for the
MT6323 device node. But the driver does not provide a OF match table.
This way auto-loading is broken as the MFD driver that registers the
device has a .of_compatible set which makes the platform .uevent
callback report a OF modalias, but that's not in the module.

Fixes: 2fdf82923618 ("regulator: mt6323: Add support for MT6323 regulator")
Signed-off-by: Matthias Brugger <mbrugger@suse.com>

---

Changes in v2:
- check for CONFIG_OF
- add Fixes tag

 drivers/regulator/mt6323-regulator.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/regulator/mt6323-regulator.c b/drivers/regulator/mt6323-regulator.c
index ff9016170db3..646742d4db74 100644
--- a/drivers/regulator/mt6323-regulator.c
+++ b/drivers/regulator/mt6323-regulator.c
@@ -406,9 +406,18 @@ static const struct platform_device_id mt6323_platform_ids[] = {
 };
 MODULE_DEVICE_TABLE(platform, mt6323_platform_ids);
 
+#ifdef CONFIG_OF
+static const struct of_device_id mt6323_of_match[] = {
+	{ .compatible = "mediatek,mt6323-regulator", },
+	{ /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, mt6323_of_match);
+#endif
+
 static struct platform_driver mt6323_regulator_driver = {
 	.driver = {
 		.name = "mt6323-regulator",
+		.of_match_table = of_match_ptr(mt6323_of_match),
 	},
 	.probe = mt6323_regulator_probe,
 	.id_table = mt6323_platform_ids,
-- 
2.29.2


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* [PATCH v2 3/3] regulator: mt6323: Add OF match table
@ 2021-01-09 11:26   ` matthias.bgg
  0 siblings, 0 replies; 39+ messages in thread
From: matthias.bgg @ 2021-01-09 11:26 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown
  Cc: Gene Chen, Matthias Brugger, Axel Lin, Matti Vaittinen,
	linux-kernel, linux-mediatek, linux-arm-kernel, John Crispin,
	Matthias Brugger, Chen Zhong, Hsin-Hsiung Wang

From: Matthias Brugger <mbrugger@suse.com>

The binding documentation mentions that a compatible is required for the
MT6323 device node. But the driver does not provide a OF match table.
This way auto-loading is broken as the MFD driver that registers the
device has a .of_compatible set which makes the platform .uevent
callback report a OF modalias, but that's not in the module.

Fixes: 2fdf82923618 ("regulator: mt6323: Add support for MT6323 regulator")
Signed-off-by: Matthias Brugger <mbrugger@suse.com>

---

Changes in v2:
- check for CONFIG_OF
- add Fixes tag

 drivers/regulator/mt6323-regulator.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/regulator/mt6323-regulator.c b/drivers/regulator/mt6323-regulator.c
index ff9016170db3..646742d4db74 100644
--- a/drivers/regulator/mt6323-regulator.c
+++ b/drivers/regulator/mt6323-regulator.c
@@ -406,9 +406,18 @@ static const struct platform_device_id mt6323_platform_ids[] = {
 };
 MODULE_DEVICE_TABLE(platform, mt6323_platform_ids);
 
+#ifdef CONFIG_OF
+static const struct of_device_id mt6323_of_match[] = {
+	{ .compatible = "mediatek,mt6323-regulator", },
+	{ /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, mt6323_of_match);
+#endif
+
 static struct platform_driver mt6323_regulator_driver = {
 	.driver = {
 		.name = "mt6323-regulator",
+		.of_match_table = of_match_ptr(mt6323_of_match),
 	},
 	.probe = mt6323_regulator_probe,
 	.id_table = mt6323_platform_ids,
-- 
2.29.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Aw: [PATCH v2 3/3] regulator: mt6323: Add OF match table
  2021-01-09 11:26   ` matthias.bgg
  (?)
@ 2021-01-09 16:44     ` Frank Wunderlich
  -1 siblings, 0 replies; 39+ messages in thread
From: Frank Wunderlich @ 2021-01-09 16:44 UTC (permalink / raw)
  To: matthias.bgg
  Cc: Liam Girdwood, Mark Brown, Gene Chen, Matthias Brugger, Axel Lin,
	Matti Vaittinen, linux-kernel, linux-mediatek, linux-arm-kernel,
	John Crispin, Matthias Brugger, Chen Zhong, Hsin-Hsiung Wang

Hi

> Gesendet: Samstag, 09. Januar 2021 um 12:26 Uhr
> Von: matthias.bgg@kernel.org

> Changes in v2:
> - check for CONFIG_OF
> - add Fixes tag

> --- a/drivers/regulator/mt6323-regulator.c
> +++ b/drivers/regulator/mt6323-regulator.c
> @@ -406,9 +406,18 @@ static const struct platform_device_id mt6323_platform_ids[] = {
>  };
>  MODULE_DEVICE_TABLE(platform, mt6323_platform_ids);
>
> +#ifdef CONFIG_OF
> +static const struct of_device_id mt6323_of_match[] = {
> +	{ .compatible = "mediatek,mt6323-regulator", },
> +	{ /* sentinel */ },
> +};
> +MODULE_DEVICE_TABLE(of, mt6323_of_match);
> +#endif
> +
>  static struct platform_driver mt6323_regulator_driver = {
>  	.driver = {
>  		.name = "mt6323-regulator",
> +		.of_match_table = of_match_ptr(mt6323_of_match),

imho check for CONFIG_OF is here needed too, else mt6323_of_match is referenced but undefined

>  	},
>  	.probe = mt6323_regulator_probe,
>  	.id_table = mt6323_platform_ids,

regards Frank

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

* Aw: [PATCH v2 3/3] regulator: mt6323: Add OF match table
@ 2021-01-09 16:44     ` Frank Wunderlich
  0 siblings, 0 replies; 39+ messages in thread
From: Frank Wunderlich @ 2021-01-09 16:44 UTC (permalink / raw)
  To: matthias.bgg
  Cc: Gene Chen, Matthias Brugger, Axel Lin, Matti Vaittinen,
	Liam Girdwood, linux-kernel, Mark Brown, linux-mediatek,
	Hsin-Hsiung Wang, John Crispin, Matthias Brugger, Chen Zhong,
	linux-arm-kernel

Hi

> Gesendet: Samstag, 09. Januar 2021 um 12:26 Uhr
> Von: matthias.bgg@kernel.org

> Changes in v2:
> - check for CONFIG_OF
> - add Fixes tag

> --- a/drivers/regulator/mt6323-regulator.c
> +++ b/drivers/regulator/mt6323-regulator.c
> @@ -406,9 +406,18 @@ static const struct platform_device_id mt6323_platform_ids[] = {
>  };
>  MODULE_DEVICE_TABLE(platform, mt6323_platform_ids);
>
> +#ifdef CONFIG_OF
> +static const struct of_device_id mt6323_of_match[] = {
> +	{ .compatible = "mediatek,mt6323-regulator", },
> +	{ /* sentinel */ },
> +};
> +MODULE_DEVICE_TABLE(of, mt6323_of_match);
> +#endif
> +
>  static struct platform_driver mt6323_regulator_driver = {
>  	.driver = {
>  		.name = "mt6323-regulator",
> +		.of_match_table = of_match_ptr(mt6323_of_match),

imho check for CONFIG_OF is here needed too, else mt6323_of_match is referenced but undefined

>  	},
>  	.probe = mt6323_regulator_probe,
>  	.id_table = mt6323_platform_ids,

regards Frank

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Aw: [PATCH v2 3/3] regulator: mt6323: Add OF match table
@ 2021-01-09 16:44     ` Frank Wunderlich
  0 siblings, 0 replies; 39+ messages in thread
From: Frank Wunderlich @ 2021-01-09 16:44 UTC (permalink / raw)
  To: matthias.bgg
  Cc: Gene Chen, Matthias Brugger, Axel Lin, Matti Vaittinen,
	Liam Girdwood, linux-kernel, Mark Brown, linux-mediatek,
	Hsin-Hsiung Wang, John Crispin, Matthias Brugger, Chen Zhong,
	linux-arm-kernel

Hi

> Gesendet: Samstag, 09. Januar 2021 um 12:26 Uhr
> Von: matthias.bgg@kernel.org

> Changes in v2:
> - check for CONFIG_OF
> - add Fixes tag

> --- a/drivers/regulator/mt6323-regulator.c
> +++ b/drivers/regulator/mt6323-regulator.c
> @@ -406,9 +406,18 @@ static const struct platform_device_id mt6323_platform_ids[] = {
>  };
>  MODULE_DEVICE_TABLE(platform, mt6323_platform_ids);
>
> +#ifdef CONFIG_OF
> +static const struct of_device_id mt6323_of_match[] = {
> +	{ .compatible = "mediatek,mt6323-regulator", },
> +	{ /* sentinel */ },
> +};
> +MODULE_DEVICE_TABLE(of, mt6323_of_match);
> +#endif
> +
>  static struct platform_driver mt6323_regulator_driver = {
>  	.driver = {
>  		.name = "mt6323-regulator",
> +		.of_match_table = of_match_ptr(mt6323_of_match),

imho check for CONFIG_OF is here needed too, else mt6323_of_match is referenced but undefined

>  	},
>  	.probe = mt6323_regulator_probe,
>  	.id_table = mt6323_platform_ids,

regards Frank

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: Aw: [PATCH v2 3/3] regulator: mt6323: Add OF match table
  2021-01-09 16:44     ` Frank Wunderlich
  (?)
@ 2021-01-10 18:48       ` Matthias Brugger
  -1 siblings, 0 replies; 39+ messages in thread
From: Matthias Brugger @ 2021-01-10 18:48 UTC (permalink / raw)
  To: Frank Wunderlich, matthias.bgg
  Cc: Liam Girdwood, Mark Brown, Gene Chen, Axel Lin, Matti Vaittinen,
	linux-kernel, linux-mediatek, linux-arm-kernel, John Crispin,
	Matthias Brugger, Chen Zhong, Hsin-Hsiung Wang



On 09/01/2021 17:44, Frank Wunderlich wrote:
> Hi
> 
>> Gesendet: Samstag, 09. Januar 2021 um 12:26 Uhr
>> Von: matthias.bgg@kernel.org
> 
>> Changes in v2:
>> - check for CONFIG_OF
>> - add Fixes tag
> 
>> --- a/drivers/regulator/mt6323-regulator.c
>> +++ b/drivers/regulator/mt6323-regulator.c
>> @@ -406,9 +406,18 @@ static const struct platform_device_id mt6323_platform_ids[] = {
>>  };
>>  MODULE_DEVICE_TABLE(platform, mt6323_platform_ids);
>>
>> +#ifdef CONFIG_OF
>> +static const struct of_device_id mt6323_of_match[] = {
>> +	{ .compatible = "mediatek,mt6323-regulator", },
>> +	{ /* sentinel */ },
>> +};
>> +MODULE_DEVICE_TABLE(of, mt6323_of_match);
>> +#endif
>> +
>>  static struct platform_driver mt6323_regulator_driver = {
>>  	.driver = {
>>  		.name = "mt6323-regulator",
>> +		.of_match_table = of_match_ptr(mt6323_of_match),
> 
> imho check for CONFIG_OF is here needed too, else mt6323_of_match is referenced but undefined
> 

No, of_match_ptr already takes care of this:
https://elixir.bootlin.com/linux/latest/source/include/linux/of.h#L998

Regards,
Matthias


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

* Re: Aw: [PATCH v2 3/3] regulator: mt6323: Add OF match table
@ 2021-01-10 18:48       ` Matthias Brugger
  0 siblings, 0 replies; 39+ messages in thread
From: Matthias Brugger @ 2021-01-10 18:48 UTC (permalink / raw)
  To: Frank Wunderlich, matthias.bgg
  Cc: Gene Chen, Axel Lin, Matti Vaittinen, Liam Girdwood,
	linux-kernel, Mark Brown, linux-mediatek, Hsin-Hsiung Wang,
	John Crispin, Matthias Brugger, Chen Zhong, linux-arm-kernel



On 09/01/2021 17:44, Frank Wunderlich wrote:
> Hi
> 
>> Gesendet: Samstag, 09. Januar 2021 um 12:26 Uhr
>> Von: matthias.bgg@kernel.org
> 
>> Changes in v2:
>> - check for CONFIG_OF
>> - add Fixes tag
> 
>> --- a/drivers/regulator/mt6323-regulator.c
>> +++ b/drivers/regulator/mt6323-regulator.c
>> @@ -406,9 +406,18 @@ static const struct platform_device_id mt6323_platform_ids[] = {
>>  };
>>  MODULE_DEVICE_TABLE(platform, mt6323_platform_ids);
>>
>> +#ifdef CONFIG_OF
>> +static const struct of_device_id mt6323_of_match[] = {
>> +	{ .compatible = "mediatek,mt6323-regulator", },
>> +	{ /* sentinel */ },
>> +};
>> +MODULE_DEVICE_TABLE(of, mt6323_of_match);
>> +#endif
>> +
>>  static struct platform_driver mt6323_regulator_driver = {
>>  	.driver = {
>>  		.name = "mt6323-regulator",
>> +		.of_match_table = of_match_ptr(mt6323_of_match),
> 
> imho check for CONFIG_OF is here needed too, else mt6323_of_match is referenced but undefined
> 

No, of_match_ptr already takes care of this:
https://elixir.bootlin.com/linux/latest/source/include/linux/of.h#L998

Regards,
Matthias


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: Aw: [PATCH v2 3/3] regulator: mt6323: Add OF match table
@ 2021-01-10 18:48       ` Matthias Brugger
  0 siblings, 0 replies; 39+ messages in thread
From: Matthias Brugger @ 2021-01-10 18:48 UTC (permalink / raw)
  To: Frank Wunderlich, matthias.bgg
  Cc: Gene Chen, Axel Lin, Matti Vaittinen, Liam Girdwood,
	linux-kernel, Mark Brown, linux-mediatek, Hsin-Hsiung Wang,
	John Crispin, Matthias Brugger, Chen Zhong, linux-arm-kernel



On 09/01/2021 17:44, Frank Wunderlich wrote:
> Hi
> 
>> Gesendet: Samstag, 09. Januar 2021 um 12:26 Uhr
>> Von: matthias.bgg@kernel.org
> 
>> Changes in v2:
>> - check for CONFIG_OF
>> - add Fixes tag
> 
>> --- a/drivers/regulator/mt6323-regulator.c
>> +++ b/drivers/regulator/mt6323-regulator.c
>> @@ -406,9 +406,18 @@ static const struct platform_device_id mt6323_platform_ids[] = {
>>  };
>>  MODULE_DEVICE_TABLE(platform, mt6323_platform_ids);
>>
>> +#ifdef CONFIG_OF
>> +static const struct of_device_id mt6323_of_match[] = {
>> +	{ .compatible = "mediatek,mt6323-regulator", },
>> +	{ /* sentinel */ },
>> +};
>> +MODULE_DEVICE_TABLE(of, mt6323_of_match);
>> +#endif
>> +
>>  static struct platform_driver mt6323_regulator_driver = {
>>  	.driver = {
>>  		.name = "mt6323-regulator",
>> +		.of_match_table = of_match_ptr(mt6323_of_match),
> 
> imho check for CONFIG_OF is here needed too, else mt6323_of_match is referenced but undefined
> 

No, of_match_ptr already takes care of this:
https://elixir.bootlin.com/linux/latest/source/include/linux/of.h#L998

Regards,
Matthias


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* RE: [PATCH v2 1/3] regulator: mt6360: Add OF match table
  2021-01-09 11:26 ` matthias.bgg
  (?)
@ 2021-01-11  2:18   ` gene_chen(陳俊宇)
  -1 siblings, 0 replies; 39+ messages in thread
From: gene_chen(陳俊宇) @ 2021-01-11  2:18 UTC (permalink / raw)
  To: matthias.bgg, Liam Girdwood, Mark Brown
  Cc: Hsin-Hsiung Wang, Axel Lin, Chen Zhong, linux-kernel,
	linux-mediatek, linux-arm-kernel, Matthias Brugger,
	Matti Vaittinen, Matthias Brugger

[ Internal Use - External ]

Hi Matthias,

I discussed OF match table with Mark in previous mail in our PATCH v3,
MFD should just instantiate the platform device.

> Mark Brown <broonie@kernel.org> 於 2020年8月20日 週四 下午7:45寫道:

> > This device only exists in the context of a single parent device, there
> > should be no need for a compatible string here - this is just a detail
> > of how Linux does things.  The MFD should just instntiate the platform
> > device.

> Trying to autoload module without of_id_table will cause run-time error:
> ueventd: LoadWithAliases was unable to load
> of:NregulatorT(null)Cmediatek,mt6360-regulator

You shouldn't have this described in the device tree at all, like I say
the MFD should just instantiate the platform device.

> -----Original Message-----
> From: matthias.bgg@kernel.org <matthias.bgg@kernel.org>
> Sent: Saturday, January 9, 2021 7:26 PM
> To: Liam Girdwood <lgirdwood@gmail.com>; Mark Brown
> <broonie@kernel.org>
> Cc: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>; Axel Lin
> <axel.lin@ingics.com>; Chen Zhong <chen.zhong@mediatek.com>;
> gene_chen(陳俊宇) <gene_chen@richtek.com>; linux-kernel@vger.kernel.org;
> linux-mediatek@lists.infradead.org; linux-arm-kernel@lists.infradead.org;
> Matthias Brugger <matthias.bgg@gmail.com>; Matti Vaittinen
> <matti.vaittinen@fi.rohmeurope.com>; Matthias Brugger
> <mbrugger@suse.com>
> Subject: [PATCH v2 1/3] regulator: mt6360: Add OF match table
>
> From: Matthias Brugger <mbrugger@suse.com>
>
> Binding documentation mentions that a compatible is required for the
> MT6360 device node, but the driver doesn't provide a OF match table.
>
> Fixes: d321571d5e4c ("regulator: mt6360: Add support for MT6360 regulator")
> Signed-off-by: Matthias Brugger <mbrugger@suse.com>
>
> ---
>
> Changes in v2:
> - check for CONFIG_OF
> - add Fixes tag
>
>  drivers/regulator/mt6360-regulator.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/drivers/regulator/mt6360-regulator.c
> b/drivers/regulator/mt6360-regulator.c
> index 15308ee29c13..f7b2514feabf 100644
> --- a/drivers/regulator/mt6360-regulator.c
> +++ b/drivers/regulator/mt6360-regulator.c
> @@ -445,9 +445,18 @@ static const struct platform_device_id
> mt6360_regulator_id_table[] = {  };  MODULE_DEVICE_TABLE(platform,
> mt6360_regulator_id_table);
>
> +#ifdef CONFIG_OF
> +static const struct of_device_id mt6360_of_match[] = {
> +{ .compatible = "mediatek,mt6360-regulator", },
> +{ /* sentinel */ },
> +};
> +MODULE_DEVICE_TABLE(of, mt6360_of_match); #endif
> +
>  static struct platform_driver mt6360_regulator_driver = {
>  .driver = {
>  .name = "mt6360-regulator",
> +.of_match_table = of_match_ptr(mt6360_of_match),
>  },
>  .probe = mt6360_regulator_probe,
>  .id_table = mt6360_regulator_id_table,
> --
> 2.29.2
************* Email Confidentiality Notice ********************

The information contained in this e-mail message (including any attachments) may be confidential, proprietary, privileged, or otherwise exempt from disclosure under applicable laws. It is intended to be conveyed only to the designated recipient(s). Any use, dissemination, distribution, printing, retaining or copying of this e-mail (including its attachments) by unintended recipient(s) is strictly prohibited and may be unlawful. If you are not an intended recipient of this e-mail, or believe that you have received this e-mail in error, please notify the sender immediately (by replying to this e-mail), delete any and all copies of this e-mail (including any attachments) from your system, and do not disclose the content of this e-mail to any other person. Thank you!

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

* RE: [PATCH v2 1/3] regulator: mt6360: Add OF match table
@ 2021-01-11  2:18   ` gene_chen(陳俊宇)
  0 siblings, 0 replies; 39+ messages in thread
From: gene_chen(陳俊宇) @ 2021-01-11  2:18 UTC (permalink / raw)
  To: matthias.bgg, Liam Girdwood, Mark Brown
  Cc: Matthias Brugger, Axel Lin, Matti Vaittinen, linux-kernel,
	linux-mediatek, Hsin-Hsiung Wang, Matthias Brugger, Chen Zhong,
	linux-arm-kernel

[ Internal Use - External ]

Hi Matthias,

I discussed OF match table with Mark in previous mail in our PATCH v3,
MFD should just instantiate the platform device.

> Mark Brown <broonie@kernel.org> 於 2020年8月20日 週四 下午7:45寫道:

> > This device only exists in the context of a single parent device, there
> > should be no need for a compatible string here - this is just a detail
> > of how Linux does things.  The MFD should just instntiate the platform
> > device.

> Trying to autoload module without of_id_table will cause run-time error:
> ueventd: LoadWithAliases was unable to load
> of:NregulatorT(null)Cmediatek,mt6360-regulator

You shouldn't have this described in the device tree at all, like I say
the MFD should just instantiate the platform device.

> -----Original Message-----
> From: matthias.bgg@kernel.org <matthias.bgg@kernel.org>
> Sent: Saturday, January 9, 2021 7:26 PM
> To: Liam Girdwood <lgirdwood@gmail.com>; Mark Brown
> <broonie@kernel.org>
> Cc: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>; Axel Lin
> <axel.lin@ingics.com>; Chen Zhong <chen.zhong@mediatek.com>;
> gene_chen(陳俊宇) <gene_chen@richtek.com>; linux-kernel@vger.kernel.org;
> linux-mediatek@lists.infradead.org; linux-arm-kernel@lists.infradead.org;
> Matthias Brugger <matthias.bgg@gmail.com>; Matti Vaittinen
> <matti.vaittinen@fi.rohmeurope.com>; Matthias Brugger
> <mbrugger@suse.com>
> Subject: [PATCH v2 1/3] regulator: mt6360: Add OF match table
>
> From: Matthias Brugger <mbrugger@suse.com>
>
> Binding documentation mentions that a compatible is required for the
> MT6360 device node, but the driver doesn't provide a OF match table.
>
> Fixes: d321571d5e4c ("regulator: mt6360: Add support for MT6360 regulator")
> Signed-off-by: Matthias Brugger <mbrugger@suse.com>
>
> ---
>
> Changes in v2:
> - check for CONFIG_OF
> - add Fixes tag
>
>  drivers/regulator/mt6360-regulator.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/drivers/regulator/mt6360-regulator.c
> b/drivers/regulator/mt6360-regulator.c
> index 15308ee29c13..f7b2514feabf 100644
> --- a/drivers/regulator/mt6360-regulator.c
> +++ b/drivers/regulator/mt6360-regulator.c
> @@ -445,9 +445,18 @@ static const struct platform_device_id
> mt6360_regulator_id_table[] = {  };  MODULE_DEVICE_TABLE(platform,
> mt6360_regulator_id_table);
>
> +#ifdef CONFIG_OF
> +static const struct of_device_id mt6360_of_match[] = {
> +{ .compatible = "mediatek,mt6360-regulator", },
> +{ /* sentinel */ },
> +};
> +MODULE_DEVICE_TABLE(of, mt6360_of_match); #endif
> +
>  static struct platform_driver mt6360_regulator_driver = {
>  .driver = {
>  .name = "mt6360-regulator",
> +.of_match_table = of_match_ptr(mt6360_of_match),
>  },
>  .probe = mt6360_regulator_probe,
>  .id_table = mt6360_regulator_id_table,
> --
> 2.29.2
************* Email Confidentiality Notice ********************

The information contained in this e-mail message (including any attachments) may be confidential, proprietary, privileged, or otherwise exempt from disclosure under applicable laws. It is intended to be conveyed only to the designated recipient(s). Any use, dissemination, distribution, printing, retaining or copying of this e-mail (including its attachments) by unintended recipient(s) is strictly prohibited and may be unlawful. If you are not an intended recipient of this e-mail, or believe that you have received this e-mail in error, please notify the sender immediately (by replying to this e-mail), delete any and all copies of this e-mail (including any attachments) from your system, and do not disclose the content of this e-mail to any other person. Thank you!
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* RE: [PATCH v2 1/3] regulator: mt6360: Add OF match table
@ 2021-01-11  2:18   ` gene_chen(陳俊宇)
  0 siblings, 0 replies; 39+ messages in thread
From: gene_chen(陳俊宇) @ 2021-01-11  2:18 UTC (permalink / raw)
  To: matthias.bgg, Liam Girdwood, Mark Brown
  Cc: Matthias Brugger, Axel Lin, Matti Vaittinen, linux-kernel,
	linux-mediatek, Hsin-Hsiung Wang, Matthias Brugger, Chen Zhong,
	linux-arm-kernel

[ Internal Use - External ]

Hi Matthias,

I discussed OF match table with Mark in previous mail in our PATCH v3,
MFD should just instantiate the platform device.

> Mark Brown <broonie@kernel.org> 於 2020年8月20日 週四 下午7:45寫道:

> > This device only exists in the context of a single parent device, there
> > should be no need for a compatible string here - this is just a detail
> > of how Linux does things.  The MFD should just instntiate the platform
> > device.

> Trying to autoload module without of_id_table will cause run-time error:
> ueventd: LoadWithAliases was unable to load
> of:NregulatorT(null)Cmediatek,mt6360-regulator

You shouldn't have this described in the device tree at all, like I say
the MFD should just instantiate the platform device.

> -----Original Message-----
> From: matthias.bgg@kernel.org <matthias.bgg@kernel.org>
> Sent: Saturday, January 9, 2021 7:26 PM
> To: Liam Girdwood <lgirdwood@gmail.com>; Mark Brown
> <broonie@kernel.org>
> Cc: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>; Axel Lin
> <axel.lin@ingics.com>; Chen Zhong <chen.zhong@mediatek.com>;
> gene_chen(陳俊宇) <gene_chen@richtek.com>; linux-kernel@vger.kernel.org;
> linux-mediatek@lists.infradead.org; linux-arm-kernel@lists.infradead.org;
> Matthias Brugger <matthias.bgg@gmail.com>; Matti Vaittinen
> <matti.vaittinen@fi.rohmeurope.com>; Matthias Brugger
> <mbrugger@suse.com>
> Subject: [PATCH v2 1/3] regulator: mt6360: Add OF match table
>
> From: Matthias Brugger <mbrugger@suse.com>
>
> Binding documentation mentions that a compatible is required for the
> MT6360 device node, but the driver doesn't provide a OF match table.
>
> Fixes: d321571d5e4c ("regulator: mt6360: Add support for MT6360 regulator")
> Signed-off-by: Matthias Brugger <mbrugger@suse.com>
>
> ---
>
> Changes in v2:
> - check for CONFIG_OF
> - add Fixes tag
>
>  drivers/regulator/mt6360-regulator.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/drivers/regulator/mt6360-regulator.c
> b/drivers/regulator/mt6360-regulator.c
> index 15308ee29c13..f7b2514feabf 100644
> --- a/drivers/regulator/mt6360-regulator.c
> +++ b/drivers/regulator/mt6360-regulator.c
> @@ -445,9 +445,18 @@ static const struct platform_device_id
> mt6360_regulator_id_table[] = {  };  MODULE_DEVICE_TABLE(platform,
> mt6360_regulator_id_table);
>
> +#ifdef CONFIG_OF
> +static const struct of_device_id mt6360_of_match[] = {
> +{ .compatible = "mediatek,mt6360-regulator", },
> +{ /* sentinel */ },
> +};
> +MODULE_DEVICE_TABLE(of, mt6360_of_match); #endif
> +
>  static struct platform_driver mt6360_regulator_driver = {
>  .driver = {
>  .name = "mt6360-regulator",
> +.of_match_table = of_match_ptr(mt6360_of_match),
>  },
>  .probe = mt6360_regulator_probe,
>  .id_table = mt6360_regulator_id_table,
> --
> 2.29.2
************* Email Confidentiality Notice ********************

The information contained in this e-mail message (including any attachments) may be confidential, proprietary, privileged, or otherwise exempt from disclosure under applicable laws. It is intended to be conveyed only to the designated recipient(s). Any use, dissemination, distribution, printing, retaining or copying of this e-mail (including its attachments) by unintended recipient(s) is strictly prohibited and may be unlawful. If you are not an intended recipient of this e-mail, or believe that you have received this e-mail in error, please notify the sender immediately (by replying to this e-mail), delete any and all copies of this e-mail (including any attachments) from your system, and do not disclose the content of this e-mail to any other person. Thank you!
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2 1/3] regulator: mt6360: Add OF match table
  2021-01-11  2:18   ` gene_chen(陳俊宇)
  (?)
@ 2021-01-11 10:08     ` Matthias Brugger
  -1 siblings, 0 replies; 39+ messages in thread
From: Matthias Brugger @ 2021-01-11 10:08 UTC (permalink / raw)
  To: gene_chen(陳俊宇),
	matthias.bgg, Liam Girdwood, Mark Brown
  Cc: Hsin-Hsiung Wang, Axel Lin, Chen Zhong, linux-kernel,
	linux-mediatek, linux-arm-kernel, Matthias Brugger,
	Matti Vaittinen



On 11/01/2021 03:18, gene_chen(陳俊宇) wrote:
> [ Internal Use - External ]
> 

Please don't top-post in the future.

> Hi Matthias,
> 
> I discussed OF match table with Mark in previous mail in our PATCH v3,
> MFD should just instantiate the platform device.

Did you ever test that? Which MFD driver should instantiate the device?
I had a look at mt6360-core.c (the obvious one) but I don't see any reference to
the regulator [1]. What am I missing?

> 
>> Mark Brown <broonie@kernel.org> 於 2020年8月20日 週四 下午7:45寫道:
> 
>>> This device only exists in the context of a single parent device, there
>>> should be no need for a compatible string here - this is just a detail
>>> of how Linux does things.  The MFD should just instntiate the platform
>>> device.
> 
>> Trying to autoload module without of_id_table will cause run-time error:
>> ueventd: LoadWithAliases was unable to load
>> of:NregulatorT(null)Cmediatek,mt6360-regulator
> 
> You shouldn't have this described in the device tree at all, like I say
> the MFD should just instantiate the platform device.
> 

Well from my understanding the regulator has a device-tree entry [2], so it
needs to match against a device-tree node. My understanding is, that you need a
the devicetree node to describe the regulators provided by the device. TBH I'm a
bit puzzled about the comment from Mark here. How does another DT node be able
to reference a regulator if this is not described in DT? I think we need a DT
node here and the matching in the regulator and MFD driver to get the regulator
loaded via udev.

Regards,
Matthias

[1] https://elixir.bootlin.com/linux/latest/source/drivers/mfd/mt6360-core.c#L294
[2]
https://elixir.bootlin.com/linux/v5.10.6/source/Documentation/devicetree/bindings/regulator/mt6360-regulator.yaml

>> -----Original Message-----
>> From: matthias.bgg@kernel.org <matthias.bgg@kernel.org>
>> Sent: Saturday, January 9, 2021 7:26 PM
>> To: Liam Girdwood <lgirdwood@gmail.com>; Mark Brown
>> <broonie@kernel.org>
>> Cc: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>; Axel Lin
>> <axel.lin@ingics.com>; Chen Zhong <chen.zhong@mediatek.com>;
>> gene_chen(陳俊宇) <gene_chen@richtek.com>; linux-kernel@vger.kernel.org;
>> linux-mediatek@lists.infradead.org; linux-arm-kernel@lists.infradead.org;
>> Matthias Brugger <matthias.bgg@gmail.com>; Matti Vaittinen
>> <matti.vaittinen@fi.rohmeurope.com>; Matthias Brugger
>> <mbrugger@suse.com>
>> Subject: [PATCH v2 1/3] regulator: mt6360: Add OF match table
>>
>> From: Matthias Brugger <mbrugger@suse.com>
>>
>> Binding documentation mentions that a compatible is required for the
>> MT6360 device node, but the driver doesn't provide a OF match table.
>>
>> Fixes: d321571d5e4c ("regulator: mt6360: Add support for MT6360 regulator")
>> Signed-off-by: Matthias Brugger <mbrugger@suse.com>
>>
>> ---
>>
>> Changes in v2:
>> - check for CONFIG_OF
>> - add Fixes tag
>>
>>  drivers/regulator/mt6360-regulator.c | 9 +++++++++
>>  1 file changed, 9 insertions(+)
>>
>> diff --git a/drivers/regulator/mt6360-regulator.c
>> b/drivers/regulator/mt6360-regulator.c
>> index 15308ee29c13..f7b2514feabf 100644
>> --- a/drivers/regulator/mt6360-regulator.c
>> +++ b/drivers/regulator/mt6360-regulator.c
>> @@ -445,9 +445,18 @@ static const struct platform_device_id
>> mt6360_regulator_id_table[] = {  };  MODULE_DEVICE_TABLE(platform,
>> mt6360_regulator_id_table);
>>
>> +#ifdef CONFIG_OF
>> +static const struct of_device_id mt6360_of_match[] = {
>> +{ .compatible = "mediatek,mt6360-regulator", },
>> +{ /* sentinel */ },
>> +};
>> +MODULE_DEVICE_TABLE(of, mt6360_of_match); #endif
>> +
>>  static struct platform_driver mt6360_regulator_driver = {
>>  .driver = {
>>  .name = "mt6360-regulator",
>> +.of_match_table = of_match_ptr(mt6360_of_match),
>>  },
>>  .probe = mt6360_regulator_probe,
>>  .id_table = mt6360_regulator_id_table,
>> --
>> 2.29.2
> ************* Email Confidentiality Notice ********************
> 
> The information contained in this e-mail message (including any attachments) may be confidential, proprietary, privileged, or otherwise exempt from disclosure under applicable laws. It is intended to be conveyed only to the designated recipient(s). Any use, dissemination, distribution, printing, retaining or copying of this e-mail (including its attachments) by unintended recipient(s) is strictly prohibited and may be unlawful. If you are not an intended recipient of this e-mail, or believe that you have received this e-mail in error, please notify the sender immediately (by replying to this e-mail), delete any and all copies of this e-mail (including any attachments) from your system, and do not disclose the content of this e-mail to any other person. Thank you!
> 


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

* Re: [PATCH v2 1/3] regulator: mt6360: Add OF match table
@ 2021-01-11 10:08     ` Matthias Brugger
  0 siblings, 0 replies; 39+ messages in thread
From: Matthias Brugger @ 2021-01-11 10:08 UTC (permalink / raw)
  To: gene_chen(陳俊宇),
	matthias.bgg, Liam Girdwood, Mark Brown
  Cc: Axel Lin, Matti Vaittinen, linux-kernel, linux-mediatek,
	Hsin-Hsiung Wang, Matthias Brugger, Chen Zhong, linux-arm-kernel



On 11/01/2021 03:18, gene_chen(陳俊宇) wrote:
> [ Internal Use - External ]
> 

Please don't top-post in the future.

> Hi Matthias,
> 
> I discussed OF match table with Mark in previous mail in our PATCH v3,
> MFD should just instantiate the platform device.

Did you ever test that? Which MFD driver should instantiate the device?
I had a look at mt6360-core.c (the obvious one) but I don't see any reference to
the regulator [1]. What am I missing?

> 
>> Mark Brown <broonie@kernel.org> 於 2020年8月20日 週四 下午7:45寫道:
> 
>>> This device only exists in the context of a single parent device, there
>>> should be no need for a compatible string here - this is just a detail
>>> of how Linux does things.  The MFD should just instntiate the platform
>>> device.
> 
>> Trying to autoload module without of_id_table will cause run-time error:
>> ueventd: LoadWithAliases was unable to load
>> of:NregulatorT(null)Cmediatek,mt6360-regulator
> 
> You shouldn't have this described in the device tree at all, like I say
> the MFD should just instantiate the platform device.
> 

Well from my understanding the regulator has a device-tree entry [2], so it
needs to match against a device-tree node. My understanding is, that you need a
the devicetree node to describe the regulators provided by the device. TBH I'm a
bit puzzled about the comment from Mark here. How does another DT node be able
to reference a regulator if this is not described in DT? I think we need a DT
node here and the matching in the regulator and MFD driver to get the regulator
loaded via udev.

Regards,
Matthias

[1] https://elixir.bootlin.com/linux/latest/source/drivers/mfd/mt6360-core.c#L294
[2]
https://elixir.bootlin.com/linux/v5.10.6/source/Documentation/devicetree/bindings/regulator/mt6360-regulator.yaml

>> -----Original Message-----
>> From: matthias.bgg@kernel.org <matthias.bgg@kernel.org>
>> Sent: Saturday, January 9, 2021 7:26 PM
>> To: Liam Girdwood <lgirdwood@gmail.com>; Mark Brown
>> <broonie@kernel.org>
>> Cc: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>; Axel Lin
>> <axel.lin@ingics.com>; Chen Zhong <chen.zhong@mediatek.com>;
>> gene_chen(陳俊宇) <gene_chen@richtek.com>; linux-kernel@vger.kernel.org;
>> linux-mediatek@lists.infradead.org; linux-arm-kernel@lists.infradead.org;
>> Matthias Brugger <matthias.bgg@gmail.com>; Matti Vaittinen
>> <matti.vaittinen@fi.rohmeurope.com>; Matthias Brugger
>> <mbrugger@suse.com>
>> Subject: [PATCH v2 1/3] regulator: mt6360: Add OF match table
>>
>> From: Matthias Brugger <mbrugger@suse.com>
>>
>> Binding documentation mentions that a compatible is required for the
>> MT6360 device node, but the driver doesn't provide a OF match table.
>>
>> Fixes: d321571d5e4c ("regulator: mt6360: Add support for MT6360 regulator")
>> Signed-off-by: Matthias Brugger <mbrugger@suse.com>
>>
>> ---
>>
>> Changes in v2:
>> - check for CONFIG_OF
>> - add Fixes tag
>>
>>  drivers/regulator/mt6360-regulator.c | 9 +++++++++
>>  1 file changed, 9 insertions(+)
>>
>> diff --git a/drivers/regulator/mt6360-regulator.c
>> b/drivers/regulator/mt6360-regulator.c
>> index 15308ee29c13..f7b2514feabf 100644
>> --- a/drivers/regulator/mt6360-regulator.c
>> +++ b/drivers/regulator/mt6360-regulator.c
>> @@ -445,9 +445,18 @@ static const struct platform_device_id
>> mt6360_regulator_id_table[] = {  };  MODULE_DEVICE_TABLE(platform,
>> mt6360_regulator_id_table);
>>
>> +#ifdef CONFIG_OF
>> +static const struct of_device_id mt6360_of_match[] = {
>> +{ .compatible = "mediatek,mt6360-regulator", },
>> +{ /* sentinel */ },
>> +};
>> +MODULE_DEVICE_TABLE(of, mt6360_of_match); #endif
>> +
>>  static struct platform_driver mt6360_regulator_driver = {
>>  .driver = {
>>  .name = "mt6360-regulator",
>> +.of_match_table = of_match_ptr(mt6360_of_match),
>>  },
>>  .probe = mt6360_regulator_probe,
>>  .id_table = mt6360_regulator_id_table,
>> --
>> 2.29.2
> ************* Email Confidentiality Notice ********************
> 
> The information contained in this e-mail message (including any attachments) may be confidential, proprietary, privileged, or otherwise exempt from disclosure under applicable laws. It is intended to be conveyed only to the designated recipient(s). Any use, dissemination, distribution, printing, retaining or copying of this e-mail (including its attachments) by unintended recipient(s) is strictly prohibited and may be unlawful. If you are not an intended recipient of this e-mail, or believe that you have received this e-mail in error, please notify the sender immediately (by replying to this e-mail), delete any and all copies of this e-mail (including any attachments) from your system, and do not disclose the content of this e-mail to any other person. Thank you!
> 


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH v2 1/3] regulator: mt6360: Add OF match table
@ 2021-01-11 10:08     ` Matthias Brugger
  0 siblings, 0 replies; 39+ messages in thread
From: Matthias Brugger @ 2021-01-11 10:08 UTC (permalink / raw)
  To: gene_chen(陳俊宇),
	matthias.bgg, Liam Girdwood, Mark Brown
  Cc: Axel Lin, Matti Vaittinen, linux-kernel, linux-mediatek,
	Hsin-Hsiung Wang, Matthias Brugger, Chen Zhong, linux-arm-kernel



On 11/01/2021 03:18, gene_chen(陳俊宇) wrote:
> [ Internal Use - External ]
> 

Please don't top-post in the future.

> Hi Matthias,
> 
> I discussed OF match table with Mark in previous mail in our PATCH v3,
> MFD should just instantiate the platform device.

Did you ever test that? Which MFD driver should instantiate the device?
I had a look at mt6360-core.c (the obvious one) but I don't see any reference to
the regulator [1]. What am I missing?

> 
>> Mark Brown <broonie@kernel.org> 於 2020年8月20日 週四 下午7:45寫道:
> 
>>> This device only exists in the context of a single parent device, there
>>> should be no need for a compatible string here - this is just a detail
>>> of how Linux does things.  The MFD should just instntiate the platform
>>> device.
> 
>> Trying to autoload module without of_id_table will cause run-time error:
>> ueventd: LoadWithAliases was unable to load
>> of:NregulatorT(null)Cmediatek,mt6360-regulator
> 
> You shouldn't have this described in the device tree at all, like I say
> the MFD should just instantiate the platform device.
> 

Well from my understanding the regulator has a device-tree entry [2], so it
needs to match against a device-tree node. My understanding is, that you need a
the devicetree node to describe the regulators provided by the device. TBH I'm a
bit puzzled about the comment from Mark here. How does another DT node be able
to reference a regulator if this is not described in DT? I think we need a DT
node here and the matching in the regulator and MFD driver to get the regulator
loaded via udev.

Regards,
Matthias

[1] https://elixir.bootlin.com/linux/latest/source/drivers/mfd/mt6360-core.c#L294
[2]
https://elixir.bootlin.com/linux/v5.10.6/source/Documentation/devicetree/bindings/regulator/mt6360-regulator.yaml

>> -----Original Message-----
>> From: matthias.bgg@kernel.org <matthias.bgg@kernel.org>
>> Sent: Saturday, January 9, 2021 7:26 PM
>> To: Liam Girdwood <lgirdwood@gmail.com>; Mark Brown
>> <broonie@kernel.org>
>> Cc: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>; Axel Lin
>> <axel.lin@ingics.com>; Chen Zhong <chen.zhong@mediatek.com>;
>> gene_chen(陳俊宇) <gene_chen@richtek.com>; linux-kernel@vger.kernel.org;
>> linux-mediatek@lists.infradead.org; linux-arm-kernel@lists.infradead.org;
>> Matthias Brugger <matthias.bgg@gmail.com>; Matti Vaittinen
>> <matti.vaittinen@fi.rohmeurope.com>; Matthias Brugger
>> <mbrugger@suse.com>
>> Subject: [PATCH v2 1/3] regulator: mt6360: Add OF match table
>>
>> From: Matthias Brugger <mbrugger@suse.com>
>>
>> Binding documentation mentions that a compatible is required for the
>> MT6360 device node, but the driver doesn't provide a OF match table.
>>
>> Fixes: d321571d5e4c ("regulator: mt6360: Add support for MT6360 regulator")
>> Signed-off-by: Matthias Brugger <mbrugger@suse.com>
>>
>> ---
>>
>> Changes in v2:
>> - check for CONFIG_OF
>> - add Fixes tag
>>
>>  drivers/regulator/mt6360-regulator.c | 9 +++++++++
>>  1 file changed, 9 insertions(+)
>>
>> diff --git a/drivers/regulator/mt6360-regulator.c
>> b/drivers/regulator/mt6360-regulator.c
>> index 15308ee29c13..f7b2514feabf 100644
>> --- a/drivers/regulator/mt6360-regulator.c
>> +++ b/drivers/regulator/mt6360-regulator.c
>> @@ -445,9 +445,18 @@ static const struct platform_device_id
>> mt6360_regulator_id_table[] = {  };  MODULE_DEVICE_TABLE(platform,
>> mt6360_regulator_id_table);
>>
>> +#ifdef CONFIG_OF
>> +static const struct of_device_id mt6360_of_match[] = {
>> +{ .compatible = "mediatek,mt6360-regulator", },
>> +{ /* sentinel */ },
>> +};
>> +MODULE_DEVICE_TABLE(of, mt6360_of_match); #endif
>> +
>>  static struct platform_driver mt6360_regulator_driver = {
>>  .driver = {
>>  .name = "mt6360-regulator",
>> +.of_match_table = of_match_ptr(mt6360_of_match),
>>  },
>>  .probe = mt6360_regulator_probe,
>>  .id_table = mt6360_regulator_id_table,
>> --
>> 2.29.2
> ************* Email Confidentiality Notice ********************
> 
> The information contained in this e-mail message (including any attachments) may be confidential, proprietary, privileged, or otherwise exempt from disclosure under applicable laws. It is intended to be conveyed only to the designated recipient(s). Any use, dissemination, distribution, printing, retaining or copying of this e-mail (including its attachments) by unintended recipient(s) is strictly prohibited and may be unlawful. If you are not an intended recipient of this e-mail, or believe that you have received this e-mail in error, please notify the sender immediately (by replying to this e-mail), delete any and all copies of this e-mail (including any attachments) from your system, and do not disclose the content of this e-mail to any other person. Thank you!
> 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2 1/3] regulator: mt6360: Add OF match table
  2021-01-11 10:08     ` Matthias Brugger
  (?)
@ 2021-01-11 10:32       ` Vaittinen, Matti
  -1 siblings, 0 replies; 39+ messages in thread
From: Vaittinen, Matti @ 2021-01-11 10:32 UTC (permalink / raw)
  To: matthias.bgg, mbrugger, broonie, lgirdwood, gene_chen
  Cc: linux-arm-kernel, chen.zhong, axel.lin, hsin-hsiung.wang,
	linux-kernel, matthias.bgg, linux-mediatek


Hello Matthias & All,

On Mon, 2021-01-11 at 11:08 +0100, Matthias Brugger wrote:
> 
> On 11/01/2021 03:18, gene_chen(陳俊宇) wrote:
> > [ Internal Use - External ]
> > 
> 
> Please don't top-post in the future.
> 
> > Hi Matthias,
> > 
> > I discussed OF match table with Mark in previous mail in our PATCH
> > v3,
> > MFD should just instantiate the platform device.
> 
> Did you ever test that? Which MFD driver should instantiate the
> device?
> I had a look at mt6360-core.c (the obvious one) but I don't see any
> reference to
> the regulator [1]. What am I missing?
> 
> > > Mark Brown <broonie@kernel.org> 於 2020年8月20日 週四 下午7:45寫道:
> > > > This device only exists in the context of a single parent
> > > > device, there
> > > > should be no need for a compatible string here - this is just a
> > > > detail
> > > > of how Linux does things.  The MFD should just instntiate the
> > > > platform
> > > > device.
> > > Trying to autoload module without of_id_table will cause run-time 
> > > error:
> > > ueventd: LoadWithAliases was unable to load
> > > of:NregulatorT(null)Cmediatek,mt6360-regulator
> > 
> > You shouldn't have this described in the device tree at all, like I
> > say
> > the MFD should just instantiate the platform device.
> > 
> 
> Well from my understanding the regulator has a device-tree entry [2],
> so it
> needs to match against a device-tree node. My understanding is, that
> you need a
> the devicetree node to describe the regulators provided by the
> device. TBH I'm a
> bit puzzled about the comment from Mark here. How does another DT
> node be able
> to reference a regulator if this is not described in DT? I think we
> need a DT
> node here and the matching in the regulator and MFD driver to get the
> regulator
> loaded via udev.

Others are better to answer - but as I spotted this from my inbox I'll
give my 2 cents :) 

This can be done W/O regulators having own compatible. Please see
following:

drivers/mfd/rohm-bd718x7.c
drivers/regulator/bd718x7-regulator.c
Documentation/devicetree/bindings/mfd/rohm,bd71847-pmic.yaml
Documentation/devicetree/bindings/regulator/rohm,bd71847-regulator.yaml

as example.

The device matching can be done via platform_device_id table.
I think the MODULE_ALIAS() is needed for module matching - but I don't
remember without further code browsing.

Anyways, the BD71837/47/50 DT entry without compatible for
clk/regulators do probe and load the sub-devices.

As a "tradeoff" subdevices must retrieve the DT node from the parent
device.

For my uneducated eyes the DT binding for regulators should be changed.
Compatible should not be required and the example node should be moved
to MFD binding document in the MFD node. But that's just my view on
this - not willing to push this to any direction!

Best Regards
	Matti Vaittinen

--
Matti Vaittinen, Linux device drivers
ROHM Semiconductors, Finland
SWDC
Kiviharjunlenkki 1E
90220 OULU
FINLAND

~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~

Simon says - in Latin please.
"non cogito me" dixit Rene Descarte, deinde evanescavit

(Thanks for the translation Simon)


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

* Re: [PATCH v2 1/3] regulator: mt6360: Add OF match table
@ 2021-01-11 10:32       ` Vaittinen, Matti
  0 siblings, 0 replies; 39+ messages in thread
From: Vaittinen, Matti @ 2021-01-11 10:32 UTC (permalink / raw)
  To: matthias.bgg, mbrugger, broonie, lgirdwood, gene_chen
  Cc: axel.lin, linux-kernel, linux-mediatek, linux-arm-kernel,
	matthias.bgg, chen.zhong, hsin-hsiung.wang


Hello Matthias & All,

On Mon, 2021-01-11 at 11:08 +0100, Matthias Brugger wrote:
> 
> On 11/01/2021 03:18, gene_chen(陳俊宇) wrote:
> > [ Internal Use - External ]
> > 
> 
> Please don't top-post in the future.
> 
> > Hi Matthias,
> > 
> > I discussed OF match table with Mark in previous mail in our PATCH
> > v3,
> > MFD should just instantiate the platform device.
> 
> Did you ever test that? Which MFD driver should instantiate the
> device?
> I had a look at mt6360-core.c (the obvious one) but I don't see any
> reference to
> the regulator [1]. What am I missing?
> 
> > > Mark Brown <broonie@kernel.org> 於 2020年8月20日 週四 下午7:45寫道:
> > > > This device only exists in the context of a single parent
> > > > device, there
> > > > should be no need for a compatible string here - this is just a
> > > > detail
> > > > of how Linux does things.  The MFD should just instntiate the
> > > > platform
> > > > device.
> > > Trying to autoload module without of_id_table will cause run-time 
> > > error:
> > > ueventd: LoadWithAliases was unable to load
> > > of:NregulatorT(null)Cmediatek,mt6360-regulator
> > 
> > You shouldn't have this described in the device tree at all, like I
> > say
> > the MFD should just instantiate the platform device.
> > 
> 
> Well from my understanding the regulator has a device-tree entry [2],
> so it
> needs to match against a device-tree node. My understanding is, that
> you need a
> the devicetree node to describe the regulators provided by the
> device. TBH I'm a
> bit puzzled about the comment from Mark here. How does another DT
> node be able
> to reference a regulator if this is not described in DT? I think we
> need a DT
> node here and the matching in the regulator and MFD driver to get the
> regulator
> loaded via udev.

Others are better to answer - but as I spotted this from my inbox I'll
give my 2 cents :) 

This can be done W/O regulators having own compatible. Please see
following:

drivers/mfd/rohm-bd718x7.c
drivers/regulator/bd718x7-regulator.c
Documentation/devicetree/bindings/mfd/rohm,bd71847-pmic.yaml
Documentation/devicetree/bindings/regulator/rohm,bd71847-regulator.yaml

as example.

The device matching can be done via platform_device_id table.
I think the MODULE_ALIAS() is needed for module matching - but I don't
remember without further code browsing.

Anyways, the BD71837/47/50 DT entry without compatible for
clk/regulators do probe and load the sub-devices.

As a "tradeoff" subdevices must retrieve the DT node from the parent
device.

For my uneducated eyes the DT binding for regulators should be changed.
Compatible should not be required and the example node should be moved
to MFD binding document in the MFD node. But that's just my view on
this - not willing to push this to any direction!

Best Regards
	Matti Vaittinen

--
Matti Vaittinen, Linux device drivers
ROHM Semiconductors, Finland
SWDC
Kiviharjunlenkki 1E
90220 OULU
FINLAND

~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~

Simon says - in Latin please.
"non cogito me" dixit Rene Descarte, deinde evanescavit

(Thanks for the translation Simon)

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH v2 1/3] regulator: mt6360: Add OF match table
@ 2021-01-11 10:32       ` Vaittinen, Matti
  0 siblings, 0 replies; 39+ messages in thread
From: Vaittinen, Matti @ 2021-01-11 10:32 UTC (permalink / raw)
  To: matthias.bgg, mbrugger, broonie, lgirdwood, gene_chen
  Cc: axel.lin, linux-kernel, linux-mediatek, linux-arm-kernel,
	matthias.bgg, chen.zhong, hsin-hsiung.wang


Hello Matthias & All,

On Mon, 2021-01-11 at 11:08 +0100, Matthias Brugger wrote:
> 
> On 11/01/2021 03:18, gene_chen(陳俊宇) wrote:
> > [ Internal Use - External ]
> > 
> 
> Please don't top-post in the future.
> 
> > Hi Matthias,
> > 
> > I discussed OF match table with Mark in previous mail in our PATCH
> > v3,
> > MFD should just instantiate the platform device.
> 
> Did you ever test that? Which MFD driver should instantiate the
> device?
> I had a look at mt6360-core.c (the obvious one) but I don't see any
> reference to
> the regulator [1]. What am I missing?
> 
> > > Mark Brown <broonie@kernel.org> 於 2020年8月20日 週四 下午7:45寫道:
> > > > This device only exists in the context of a single parent
> > > > device, there
> > > > should be no need for a compatible string here - this is just a
> > > > detail
> > > > of how Linux does things.  The MFD should just instntiate the
> > > > platform
> > > > device.
> > > Trying to autoload module without of_id_table will cause run-time 
> > > error:
> > > ueventd: LoadWithAliases was unable to load
> > > of:NregulatorT(null)Cmediatek,mt6360-regulator
> > 
> > You shouldn't have this described in the device tree at all, like I
> > say
> > the MFD should just instantiate the platform device.
> > 
> 
> Well from my understanding the regulator has a device-tree entry [2],
> so it
> needs to match against a device-tree node. My understanding is, that
> you need a
> the devicetree node to describe the regulators provided by the
> device. TBH I'm a
> bit puzzled about the comment from Mark here. How does another DT
> node be able
> to reference a regulator if this is not described in DT? I think we
> need a DT
> node here and the matching in the regulator and MFD driver to get the
> regulator
> loaded via udev.

Others are better to answer - but as I spotted this from my inbox I'll
give my 2 cents :) 

This can be done W/O regulators having own compatible. Please see
following:

drivers/mfd/rohm-bd718x7.c
drivers/regulator/bd718x7-regulator.c
Documentation/devicetree/bindings/mfd/rohm,bd71847-pmic.yaml
Documentation/devicetree/bindings/regulator/rohm,bd71847-regulator.yaml

as example.

The device matching can be done via platform_device_id table.
I think the MODULE_ALIAS() is needed for module matching - but I don't
remember without further code browsing.

Anyways, the BD71837/47/50 DT entry without compatible for
clk/regulators do probe and load the sub-devices.

As a "tradeoff" subdevices must retrieve the DT node from the parent
device.

For my uneducated eyes the DT binding for regulators should be changed.
Compatible should not be required and the example node should be moved
to MFD binding document in the MFD node. But that's just my view on
this - not willing to push this to any direction!

Best Regards
	Matti Vaittinen

--
Matti Vaittinen, Linux device drivers
ROHM Semiconductors, Finland
SWDC
Kiviharjunlenkki 1E
90220 OULU
FINLAND

~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~

Simon says - in Latin please.
"non cogito me" dixit Rene Descarte, deinde evanescavit

(Thanks for the translation Simon)

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2 1/3] regulator: mt6360: Add OF match table
  2021-01-11 10:32       ` Vaittinen, Matti
  (?)
@ 2021-01-11 12:38         ` Matthias Brugger
  -1 siblings, 0 replies; 39+ messages in thread
From: Matthias Brugger @ 2021-01-11 12:38 UTC (permalink / raw)
  To: Vaittinen, Matti, matthias.bgg, broonie, lgirdwood, gene_chen
  Cc: linux-arm-kernel, chen.zhong, axel.lin, hsin-hsiung.wang,
	linux-kernel, matthias.bgg, linux-mediatek

Hi Matti,

On 11/01/2021 11:32, Vaittinen, Matti wrote:
> 
> Hello Matthias & All,
> 
> On Mon, 2021-01-11 at 11:08 +0100, Matthias Brugger wrote:
>>
>> On 11/01/2021 03:18, gene_chen(陳俊宇) wrote:
>>> [ Internal Use - External ]
>>>
>>
>> Please don't top-post in the future.
>>
>>> Hi Matthias,
>>>
>>> I discussed OF match table with Mark in previous mail in our PATCH
>>> v3,
>>> MFD should just instantiate the platform device.
>>
>> Did you ever test that? Which MFD driver should instantiate the
>> device?
>> I had a look at mt6360-core.c (the obvious one) but I don't see any
>> reference to
>> the regulator [1]. What am I missing?
>>
>>>> Mark Brown <broonie@kernel.org> 於 2020年8月20日 週四 下午7:45寫道:
>>>>> This device only exists in the context of a single parent
>>>>> device, there
>>>>> should be no need for a compatible string here - this is just a
>>>>> detail
>>>>> of how Linux does things.  The MFD should just instntiate the
>>>>> platform
>>>>> device.
>>>> Trying to autoload module without of_id_table will cause run-time 
>>>> error:
>>>> ueventd: LoadWithAliases was unable to load
>>>> of:NregulatorT(null)Cmediatek,mt6360-regulator
>>>
>>> You shouldn't have this described in the device tree at all, like I
>>> say
>>> the MFD should just instantiate the platform device.
>>>
>>
>> Well from my understanding the regulator has a device-tree entry [2],
>> so it
>> needs to match against a device-tree node. My understanding is, that
>> you need a
>> the devicetree node to describe the regulators provided by the
>> device. TBH I'm a
>> bit puzzled about the comment from Mark here. How does another DT
>> node be able
>> to reference a regulator if this is not described in DT? I think we
>> need a DT
>> node here and the matching in the regulator and MFD driver to get the
>> regulator
>> loaded via udev.
> 
> Others are better to answer - but as I spotted this from my inbox I'll
> give my 2 cents :) 
> 
> This can be done W/O regulators having own compatible. Please see
> following:
> 
> drivers/mfd/rohm-bd718x7.c
> drivers/regulator/bd718x7-regulator.c
> Documentation/devicetree/bindings/mfd/rohm,bd71847-pmic.yaml
> Documentation/devicetree/bindings/regulator/rohm,bd71847-regulator.yaml
> 
> as example.

Thanks for the links. Yes that's' a way to go, but...

> 
> The device matching can be done via platform_device_id table.
> I think the MODULE_ALIAS() is needed for module matching - but I don't
> remember without further code browsing.
> 
> Anyways, the BD71837/47/50 DT entry without compatible for
> clk/regulators do probe and load the sub-devices.
> 
> As a "tradeoff" subdevices must retrieve the DT node from the parent
> device.
> 
> For my uneducated eyes the DT binding for regulators should be changed.
> Compatible should not be required and the example node should be moved
> to MFD binding document in the MFD node. But that's just my view on
> this - not willing to push this to any direction!
> 

Generally speaking, DT bindings are stable and can't be changed in a
none-compatible way. We could argue if there is any user of the compatible out
there (probably there isn't any, as the code seems to not even be working).
Apart from that all other cells in the MFD driver are defined as OF_MFD_CELL
[1]. Actually I suspect that mt6360_ldo should represent mt6360-regulator.

Regards,
Matthias

[1] https://elixir.bootlin.com/linux/latest/source/drivers/mfd/mt6360-core.c#L294

> Best Regards
> 	Matti Vaittinen
> 
> --
> Matti Vaittinen, Linux device drivers
> ROHM Semiconductors, Finland
> SWDC
> Kiviharjunlenkki 1E
> 90220 OULU
> FINLAND
> 
> ~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~
> 
> Simon says - in Latin please.
> "non cogito me" dixit Rene Descarte, deinde evanescavit
> 
> (Thanks for the translation Simon)
> 


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

* Re: [PATCH v2 1/3] regulator: mt6360: Add OF match table
@ 2021-01-11 12:38         ` Matthias Brugger
  0 siblings, 0 replies; 39+ messages in thread
From: Matthias Brugger @ 2021-01-11 12:38 UTC (permalink / raw)
  To: Vaittinen, Matti, matthias.bgg, broonie, lgirdwood, gene_chen
  Cc: axel.lin, linux-kernel, linux-mediatek, linux-arm-kernel,
	matthias.bgg, chen.zhong, hsin-hsiung.wang

Hi Matti,

On 11/01/2021 11:32, Vaittinen, Matti wrote:
> 
> Hello Matthias & All,
> 
> On Mon, 2021-01-11 at 11:08 +0100, Matthias Brugger wrote:
>>
>> On 11/01/2021 03:18, gene_chen(陳俊宇) wrote:
>>> [ Internal Use - External ]
>>>
>>
>> Please don't top-post in the future.
>>
>>> Hi Matthias,
>>>
>>> I discussed OF match table with Mark in previous mail in our PATCH
>>> v3,
>>> MFD should just instantiate the platform device.
>>
>> Did you ever test that? Which MFD driver should instantiate the
>> device?
>> I had a look at mt6360-core.c (the obvious one) but I don't see any
>> reference to
>> the regulator [1]. What am I missing?
>>
>>>> Mark Brown <broonie@kernel.org> 於 2020年8月20日 週四 下午7:45寫道:
>>>>> This device only exists in the context of a single parent
>>>>> device, there
>>>>> should be no need for a compatible string here - this is just a
>>>>> detail
>>>>> of how Linux does things.  The MFD should just instntiate the
>>>>> platform
>>>>> device.
>>>> Trying to autoload module without of_id_table will cause run-time 
>>>> error:
>>>> ueventd: LoadWithAliases was unable to load
>>>> of:NregulatorT(null)Cmediatek,mt6360-regulator
>>>
>>> You shouldn't have this described in the device tree at all, like I
>>> say
>>> the MFD should just instantiate the platform device.
>>>
>>
>> Well from my understanding the regulator has a device-tree entry [2],
>> so it
>> needs to match against a device-tree node. My understanding is, that
>> you need a
>> the devicetree node to describe the regulators provided by the
>> device. TBH I'm a
>> bit puzzled about the comment from Mark here. How does another DT
>> node be able
>> to reference a regulator if this is not described in DT? I think we
>> need a DT
>> node here and the matching in the regulator and MFD driver to get the
>> regulator
>> loaded via udev.
> 
> Others are better to answer - but as I spotted this from my inbox I'll
> give my 2 cents :) 
> 
> This can be done W/O regulators having own compatible. Please see
> following:
> 
> drivers/mfd/rohm-bd718x7.c
> drivers/regulator/bd718x7-regulator.c
> Documentation/devicetree/bindings/mfd/rohm,bd71847-pmic.yaml
> Documentation/devicetree/bindings/regulator/rohm,bd71847-regulator.yaml
> 
> as example.

Thanks for the links. Yes that's' a way to go, but...

> 
> The device matching can be done via platform_device_id table.
> I think the MODULE_ALIAS() is needed for module matching - but I don't
> remember without further code browsing.
> 
> Anyways, the BD71837/47/50 DT entry without compatible for
> clk/regulators do probe and load the sub-devices.
> 
> As a "tradeoff" subdevices must retrieve the DT node from the parent
> device.
> 
> For my uneducated eyes the DT binding for regulators should be changed.
> Compatible should not be required and the example node should be moved
> to MFD binding document in the MFD node. But that's just my view on
> this - not willing to push this to any direction!
> 

Generally speaking, DT bindings are stable and can't be changed in a
none-compatible way. We could argue if there is any user of the compatible out
there (probably there isn't any, as the code seems to not even be working).
Apart from that all other cells in the MFD driver are defined as OF_MFD_CELL
[1]. Actually I suspect that mt6360_ldo should represent mt6360-regulator.

Regards,
Matthias

[1] https://elixir.bootlin.com/linux/latest/source/drivers/mfd/mt6360-core.c#L294

> Best Regards
> 	Matti Vaittinen
> 
> --
> Matti Vaittinen, Linux device drivers
> ROHM Semiconductors, Finland
> SWDC
> Kiviharjunlenkki 1E
> 90220 OULU
> FINLAND
> 
> ~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~
> 
> Simon says - in Latin please.
> "non cogito me" dixit Rene Descarte, deinde evanescavit
> 
> (Thanks for the translation Simon)
> 


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH v2 1/3] regulator: mt6360: Add OF match table
@ 2021-01-11 12:38         ` Matthias Brugger
  0 siblings, 0 replies; 39+ messages in thread
From: Matthias Brugger @ 2021-01-11 12:38 UTC (permalink / raw)
  To: Vaittinen, Matti, matthias.bgg, broonie, lgirdwood, gene_chen
  Cc: axel.lin, linux-kernel, linux-mediatek, linux-arm-kernel,
	matthias.bgg, chen.zhong, hsin-hsiung.wang

Hi Matti,

On 11/01/2021 11:32, Vaittinen, Matti wrote:
> 
> Hello Matthias & All,
> 
> On Mon, 2021-01-11 at 11:08 +0100, Matthias Brugger wrote:
>>
>> On 11/01/2021 03:18, gene_chen(陳俊宇) wrote:
>>> [ Internal Use - External ]
>>>
>>
>> Please don't top-post in the future.
>>
>>> Hi Matthias,
>>>
>>> I discussed OF match table with Mark in previous mail in our PATCH
>>> v3,
>>> MFD should just instantiate the platform device.
>>
>> Did you ever test that? Which MFD driver should instantiate the
>> device?
>> I had a look at mt6360-core.c (the obvious one) but I don't see any
>> reference to
>> the regulator [1]. What am I missing?
>>
>>>> Mark Brown <broonie@kernel.org> 於 2020年8月20日 週四 下午7:45寫道:
>>>>> This device only exists in the context of a single parent
>>>>> device, there
>>>>> should be no need for a compatible string here - this is just a
>>>>> detail
>>>>> of how Linux does things.  The MFD should just instntiate the
>>>>> platform
>>>>> device.
>>>> Trying to autoload module without of_id_table will cause run-time 
>>>> error:
>>>> ueventd: LoadWithAliases was unable to load
>>>> of:NregulatorT(null)Cmediatek,mt6360-regulator
>>>
>>> You shouldn't have this described in the device tree at all, like I
>>> say
>>> the MFD should just instantiate the platform device.
>>>
>>
>> Well from my understanding the regulator has a device-tree entry [2],
>> so it
>> needs to match against a device-tree node. My understanding is, that
>> you need a
>> the devicetree node to describe the regulators provided by the
>> device. TBH I'm a
>> bit puzzled about the comment from Mark here. How does another DT
>> node be able
>> to reference a regulator if this is not described in DT? I think we
>> need a DT
>> node here and the matching in the regulator and MFD driver to get the
>> regulator
>> loaded via udev.
> 
> Others are better to answer - but as I spotted this from my inbox I'll
> give my 2 cents :) 
> 
> This can be done W/O regulators having own compatible. Please see
> following:
> 
> drivers/mfd/rohm-bd718x7.c
> drivers/regulator/bd718x7-regulator.c
> Documentation/devicetree/bindings/mfd/rohm,bd71847-pmic.yaml
> Documentation/devicetree/bindings/regulator/rohm,bd71847-regulator.yaml
> 
> as example.

Thanks for the links. Yes that's' a way to go, but...

> 
> The device matching can be done via platform_device_id table.
> I think the MODULE_ALIAS() is needed for module matching - but I don't
> remember without further code browsing.
> 
> Anyways, the BD71837/47/50 DT entry without compatible for
> clk/regulators do probe and load the sub-devices.
> 
> As a "tradeoff" subdevices must retrieve the DT node from the parent
> device.
> 
> For my uneducated eyes the DT binding for regulators should be changed.
> Compatible should not be required and the example node should be moved
> to MFD binding document in the MFD node. But that's just my view on
> this - not willing to push this to any direction!
> 

Generally speaking, DT bindings are stable and can't be changed in a
none-compatible way. We could argue if there is any user of the compatible out
there (probably there isn't any, as the code seems to not even be working).
Apart from that all other cells in the MFD driver are defined as OF_MFD_CELL
[1]. Actually I suspect that mt6360_ldo should represent mt6360-regulator.

Regards,
Matthias

[1] https://elixir.bootlin.com/linux/latest/source/drivers/mfd/mt6360-core.c#L294

> Best Regards
> 	Matti Vaittinen
> 
> --
> Matti Vaittinen, Linux device drivers
> ROHM Semiconductors, Finland
> SWDC
> Kiviharjunlenkki 1E
> 90220 OULU
> FINLAND
> 
> ~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~
> 
> Simon says - in Latin please.
> "non cogito me" dixit Rene Descarte, deinde evanescavit
> 
> (Thanks for the translation Simon)
> 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2 1/3] regulator: mt6360: Add OF match table
  2021-01-11 12:38         ` Matthias Brugger
  (?)
@ 2021-01-11 12:53           ` Vaittinen, Matti
  -1 siblings, 0 replies; 39+ messages in thread
From: Vaittinen, Matti @ 2021-01-11 12:53 UTC (permalink / raw)
  To: matthias.bgg, mbrugger, broonie, lgirdwood, gene_chen
  Cc: linux-arm-kernel, chen.zhong, axel.lin, hsin-hsiung.wang,
	linux-kernel, matthias.bgg, linux-mediatek


On Mon, 2021-01-11 at 13:38 +0100, Matthias Brugger wrote:
> Hi Matti,
> 
> On 11/01/2021 11:32, Vaittinen, Matti wrote:
> > Hello Matthias & All,
> > 
> > On Mon, 2021-01-11 at 11:08 +0100, Matthias Brugger wrote:
> > > On 11/01/2021 03:18, gene_chen(陳俊宇) wrote:
> > > > [ Internal Use - External ]
> > > > 
> > > 
> > > Please don't top-post in the future.
> > > 
> > > > Hi Matthias,
> > > > 
> > > > I discussed OF match table with Mark in previous mail in our
> > > > PATCH
> > > > v3,
> > > > MFD should just instantiate the platform device.
> > > 
> > > Did you ever test that? Which MFD driver should instantiate the
> > > device?
> > > I had a look at mt6360-core.c (the obvious one) but I don't see
> > > any
> > > reference to
> > > the regulator [1]. What am I missing?
> > > 
> > > > > Mark Brown <broonie@kernel.org> 於 2020年8月20日 週四 下午7:45寫道:
> > > > > > This device only exists in the context of a single parent
> > > > > > device, there
> > > > > > should be no need for a compatible string here - this is
> > > > > > just a
> > > > > > detail
> > > > > > of how Linux does things.  The MFD should just instntiate
> > > > > > the
> > > > > > platform
> > > > > > device.
> > > > > Trying to autoload module without of_id_table will cause run-
> > > > > time 
> > > > > error:
> > > > > ueventd: LoadWithAliases was unable to load
> > > > > of:NregulatorT(null)Cmediatek,mt6360-regulator
> > > > 
> > > > You shouldn't have this described in the device tree at all,
> > > > like I
> > > > say
> > > > the MFD should just instantiate the platform device.
> > > > 
> > > 
> > > Well from my understanding the regulator has a device-tree entry
> > > [2],
> > > so it
> > > needs to match against a device-tree node. My understanding is,
> > > that
> > > you need a
> > > the devicetree node to describe the regulators provided by the
> > > device. TBH I'm a
> > > bit puzzled about the comment from Mark here. How does another DT
> > > node be able
> > > to reference a regulator if this is not described in DT? I think
> > > we
> > > need a DT
> > > node here and the matching in the regulator and MFD driver to get
> > > the
> > > regulator
> > > loaded via udev.
> > 
> > Others are better to answer - but as I spotted this from my inbox
> > I'll
> > give my 2 cents :) 
> > 
> > This can be done W/O regulators having own compatible. Please see
> > following:
> > 
> > drivers/mfd/rohm-bd718x7.c
> > drivers/regulator/bd718x7-regulator.c
> > Documentation/devicetree/bindings/mfd/rohm,bd71847-pmic.yaml
> > Documentation/devicetree/bindings/regulator/rohm,bd71847-
> > regulator.yaml
> > 
> > as example.
> 
> Thanks for the links. Yes that's' a way to go, but...
> 
> > The device matching can be done via platform_device_id table.
> > I think the MODULE_ALIAS() is needed for module matching - but I
> > don't
> > remember without further code browsing.
> > 
> > Anyways, the BD71837/47/50 DT entry without compatible for
> > clk/regulators do probe and load the sub-devices.
> > 
> > As a "tradeoff" subdevices must retrieve the DT node from the
> > parent
> > device.
> > 
> > For my uneducated eyes the DT binding for regulators should be
> > changed.
> > Compatible should not be required and the example node should be
> > moved
> > to MFD binding document in the MFD node. But that's just my view on
> > this - not willing to push this to any direction!
> > 
> 
> Generally speaking, DT bindings are stable and can't be changed in a
> none-compatible way. We could argue if there is any user of the
> compatible out
> there (probably there isn't any, as the code seems to not even be
> working).

I think this depends on the device where driver(s) are used. Quite a
few devices allow updating the device-tree when SW is updated. But as I
said, I don't want to try pushing this one direction or other - I leave
it for those who have broader shoulders for pushing XD.

I was merely trying to answer your question :)

Best Regards
	Matti

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

* Re: [PATCH v2 1/3] regulator: mt6360: Add OF match table
@ 2021-01-11 12:53           ` Vaittinen, Matti
  0 siblings, 0 replies; 39+ messages in thread
From: Vaittinen, Matti @ 2021-01-11 12:53 UTC (permalink / raw)
  To: matthias.bgg, mbrugger, broonie, lgirdwood, gene_chen
  Cc: axel.lin, linux-kernel, linux-mediatek, linux-arm-kernel,
	matthias.bgg, chen.zhong, hsin-hsiung.wang


On Mon, 2021-01-11 at 13:38 +0100, Matthias Brugger wrote:
> Hi Matti,
> 
> On 11/01/2021 11:32, Vaittinen, Matti wrote:
> > Hello Matthias & All,
> > 
> > On Mon, 2021-01-11 at 11:08 +0100, Matthias Brugger wrote:
> > > On 11/01/2021 03:18, gene_chen(陳俊宇) wrote:
> > > > [ Internal Use - External ]
> > > > 
> > > 
> > > Please don't top-post in the future.
> > > 
> > > > Hi Matthias,
> > > > 
> > > > I discussed OF match table with Mark in previous mail in our
> > > > PATCH
> > > > v3,
> > > > MFD should just instantiate the platform device.
> > > 
> > > Did you ever test that? Which MFD driver should instantiate the
> > > device?
> > > I had a look at mt6360-core.c (the obvious one) but I don't see
> > > any
> > > reference to
> > > the regulator [1]. What am I missing?
> > > 
> > > > > Mark Brown <broonie@kernel.org> 於 2020年8月20日 週四 下午7:45寫道:
> > > > > > This device only exists in the context of a single parent
> > > > > > device, there
> > > > > > should be no need for a compatible string here - this is
> > > > > > just a
> > > > > > detail
> > > > > > of how Linux does things.  The MFD should just instntiate
> > > > > > the
> > > > > > platform
> > > > > > device.
> > > > > Trying to autoload module without of_id_table will cause run-
> > > > > time 
> > > > > error:
> > > > > ueventd: LoadWithAliases was unable to load
> > > > > of:NregulatorT(null)Cmediatek,mt6360-regulator
> > > > 
> > > > You shouldn't have this described in the device tree at all,
> > > > like I
> > > > say
> > > > the MFD should just instantiate the platform device.
> > > > 
> > > 
> > > Well from my understanding the regulator has a device-tree entry
> > > [2],
> > > so it
> > > needs to match against a device-tree node. My understanding is,
> > > that
> > > you need a
> > > the devicetree node to describe the regulators provided by the
> > > device. TBH I'm a
> > > bit puzzled about the comment from Mark here. How does another DT
> > > node be able
> > > to reference a regulator if this is not described in DT? I think
> > > we
> > > need a DT
> > > node here and the matching in the regulator and MFD driver to get
> > > the
> > > regulator
> > > loaded via udev.
> > 
> > Others are better to answer - but as I spotted this from my inbox
> > I'll
> > give my 2 cents :) 
> > 
> > This can be done W/O regulators having own compatible. Please see
> > following:
> > 
> > drivers/mfd/rohm-bd718x7.c
> > drivers/regulator/bd718x7-regulator.c
> > Documentation/devicetree/bindings/mfd/rohm,bd71847-pmic.yaml
> > Documentation/devicetree/bindings/regulator/rohm,bd71847-
> > regulator.yaml
> > 
> > as example.
> 
> Thanks for the links. Yes that's' a way to go, but...
> 
> > The device matching can be done via platform_device_id table.
> > I think the MODULE_ALIAS() is needed for module matching - but I
> > don't
> > remember without further code browsing.
> > 
> > Anyways, the BD71837/47/50 DT entry without compatible for
> > clk/regulators do probe and load the sub-devices.
> > 
> > As a "tradeoff" subdevices must retrieve the DT node from the
> > parent
> > device.
> > 
> > For my uneducated eyes the DT binding for regulators should be
> > changed.
> > Compatible should not be required and the example node should be
> > moved
> > to MFD binding document in the MFD node. But that's just my view on
> > this - not willing to push this to any direction!
> > 
> 
> Generally speaking, DT bindings are stable and can't be changed in a
> none-compatible way. We could argue if there is any user of the
> compatible out
> there (probably there isn't any, as the code seems to not even be
> working).

I think this depends on the device where driver(s) are used. Quite a
few devices allow updating the device-tree when SW is updated. But as I
said, I don't want to try pushing this one direction or other - I leave
it for those who have broader shoulders for pushing XD.

I was merely trying to answer your question :)

Best Regards
	Matti
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH v2 1/3] regulator: mt6360: Add OF match table
@ 2021-01-11 12:53           ` Vaittinen, Matti
  0 siblings, 0 replies; 39+ messages in thread
From: Vaittinen, Matti @ 2021-01-11 12:53 UTC (permalink / raw)
  To: matthias.bgg, mbrugger, broonie, lgirdwood, gene_chen
  Cc: axel.lin, linux-kernel, linux-mediatek, linux-arm-kernel,
	matthias.bgg, chen.zhong, hsin-hsiung.wang


On Mon, 2021-01-11 at 13:38 +0100, Matthias Brugger wrote:
> Hi Matti,
> 
> On 11/01/2021 11:32, Vaittinen, Matti wrote:
> > Hello Matthias & All,
> > 
> > On Mon, 2021-01-11 at 11:08 +0100, Matthias Brugger wrote:
> > > On 11/01/2021 03:18, gene_chen(陳俊宇) wrote:
> > > > [ Internal Use - External ]
> > > > 
> > > 
> > > Please don't top-post in the future.
> > > 
> > > > Hi Matthias,
> > > > 
> > > > I discussed OF match table with Mark in previous mail in our
> > > > PATCH
> > > > v3,
> > > > MFD should just instantiate the platform device.
> > > 
> > > Did you ever test that? Which MFD driver should instantiate the
> > > device?
> > > I had a look at mt6360-core.c (the obvious one) but I don't see
> > > any
> > > reference to
> > > the regulator [1]. What am I missing?
> > > 
> > > > > Mark Brown <broonie@kernel.org> 於 2020年8月20日 週四 下午7:45寫道:
> > > > > > This device only exists in the context of a single parent
> > > > > > device, there
> > > > > > should be no need for a compatible string here - this is
> > > > > > just a
> > > > > > detail
> > > > > > of how Linux does things.  The MFD should just instntiate
> > > > > > the
> > > > > > platform
> > > > > > device.
> > > > > Trying to autoload module without of_id_table will cause run-
> > > > > time 
> > > > > error:
> > > > > ueventd: LoadWithAliases was unable to load
> > > > > of:NregulatorT(null)Cmediatek,mt6360-regulator
> > > > 
> > > > You shouldn't have this described in the device tree at all,
> > > > like I
> > > > say
> > > > the MFD should just instantiate the platform device.
> > > > 
> > > 
> > > Well from my understanding the regulator has a device-tree entry
> > > [2],
> > > so it
> > > needs to match against a device-tree node. My understanding is,
> > > that
> > > you need a
> > > the devicetree node to describe the regulators provided by the
> > > device. TBH I'm a
> > > bit puzzled about the comment from Mark here. How does another DT
> > > node be able
> > > to reference a regulator if this is not described in DT? I think
> > > we
> > > need a DT
> > > node here and the matching in the regulator and MFD driver to get
> > > the
> > > regulator
> > > loaded via udev.
> > 
> > Others are better to answer - but as I spotted this from my inbox
> > I'll
> > give my 2 cents :) 
> > 
> > This can be done W/O regulators having own compatible. Please see
> > following:
> > 
> > drivers/mfd/rohm-bd718x7.c
> > drivers/regulator/bd718x7-regulator.c
> > Documentation/devicetree/bindings/mfd/rohm,bd71847-pmic.yaml
> > Documentation/devicetree/bindings/regulator/rohm,bd71847-
> > regulator.yaml
> > 
> > as example.
> 
> Thanks for the links. Yes that's' a way to go, but...
> 
> > The device matching can be done via platform_device_id table.
> > I think the MODULE_ALIAS() is needed for module matching - but I
> > don't
> > remember without further code browsing.
> > 
> > Anyways, the BD71837/47/50 DT entry without compatible for
> > clk/regulators do probe and load the sub-devices.
> > 
> > As a "tradeoff" subdevices must retrieve the DT node from the
> > parent
> > device.
> > 
> > For my uneducated eyes the DT binding for regulators should be
> > changed.
> > Compatible should not be required and the example node should be
> > moved
> > to MFD binding document in the MFD node. But that's just my view on
> > this - not willing to push this to any direction!
> > 
> 
> Generally speaking, DT bindings are stable and can't be changed in a
> none-compatible way. We could argue if there is any user of the
> compatible out
> there (probably there isn't any, as the code seems to not even be
> working).

I think this depends on the device where driver(s) are used. Quite a
few devices allow updating the device-tree when SW is updated. But as I
said, I don't want to try pushing this one direction or other - I leave
it for those who have broader shoulders for pushing XD.

I was merely trying to answer your question :)

Best Regards
	Matti
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2 1/3] regulator: mt6360: Add OF match table
  2021-01-11  2:18   ` gene_chen(陳俊宇)
  (?)
@ 2021-01-11 14:42     ` Matthias Brugger
  -1 siblings, 0 replies; 39+ messages in thread
From: Matthias Brugger @ 2021-01-11 14:42 UTC (permalink / raw)
  To: gene_chen(陳俊宇),
	matthias.bgg, Liam Girdwood, Mark Brown
  Cc: Hsin-Hsiung Wang, Axel Lin, Chen Zhong, linux-kernel,
	linux-mediatek, linux-arm-kernel, Matthias Brugger,
	Matti Vaittinen



On 11/01/2021 03:18, gene_chen(陳俊宇) wrote:
> [ Internal Use - External ]
> 
> Hi Matthias,
> 
> I discussed OF match table with Mark in previous mail in our PATCH v3,
> MFD should just instantiate the platform device.
> 
>> Mark Brown <broonie@kernel.org> 於 2020年8月20日 週四 下午7:45寫道:
> 
>>> This device only exists in the context of a single parent device, there
>>> should be no need for a compatible string here - this is just a detail
>>> of how Linux does things.  The MFD should just instntiate the platform
>>> device.
> 
>> Trying to autoload module without of_id_table will cause run-time error:
>> ueventd: LoadWithAliases was unable to load
>> of:NregulatorT(null)Cmediatek,mt6360-regulator
> 
> You shouldn't have this described in the device tree at all, like I say
> the MFD should just instantiate the platform device.
> 

Well with the patch you send to enable regulators [1]  you use OF_MFD_CELL. So
my understanding is, if you don't provide an of_match_table in the regulator
driver, the loading via udev is broken (like you mentioned in the cite from an
older email).

Regards,
Matthias

[1]
https://lore.kernel.org/linux-mediatek/1605177598-23501-5-git-send-email-gene.chen.richtek@gmail.com/

>> -----Original Message-----
>> From: matthias.bgg@kernel.org <matthias.bgg@kernel.org>
>> Sent: Saturday, January 9, 2021 7:26 PM
>> To: Liam Girdwood <lgirdwood@gmail.com>; Mark Brown
>> <broonie@kernel.org>
>> Cc: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>; Axel Lin
>> <axel.lin@ingics.com>; Chen Zhong <chen.zhong@mediatek.com>;
>> gene_chen(陳俊宇) <gene_chen@richtek.com>; linux-kernel@vger.kernel.org;
>> linux-mediatek@lists.infradead.org; linux-arm-kernel@lists.infradead.org;
>> Matthias Brugger <matthias.bgg@gmail.com>; Matti Vaittinen
>> <matti.vaittinen@fi.rohmeurope.com>; Matthias Brugger
>> <mbrugger@suse.com>
>> Subject: [PATCH v2 1/3] regulator: mt6360: Add OF match table
>>
>> From: Matthias Brugger <mbrugger@suse.com>
>>
>> Binding documentation mentions that a compatible is required for the
>> MT6360 device node, but the driver doesn't provide a OF match table.
>>
>> Fixes: d321571d5e4c ("regulator: mt6360: Add support for MT6360 regulator")
>> Signed-off-by: Matthias Brugger <mbrugger@suse.com>
>>
>> ---
>>
>> Changes in v2:
>> - check for CONFIG_OF
>> - add Fixes tag
>>
>>  drivers/regulator/mt6360-regulator.c | 9 +++++++++
>>  1 file changed, 9 insertions(+)
>>
>> diff --git a/drivers/regulator/mt6360-regulator.c
>> b/drivers/regulator/mt6360-regulator.c
>> index 15308ee29c13..f7b2514feabf 100644
>> --- a/drivers/regulator/mt6360-regulator.c
>> +++ b/drivers/regulator/mt6360-regulator.c
>> @@ -445,9 +445,18 @@ static const struct platform_device_id
>> mt6360_regulator_id_table[] = {  };  MODULE_DEVICE_TABLE(platform,
>> mt6360_regulator_id_table);
>>
>> +#ifdef CONFIG_OF
>> +static const struct of_device_id mt6360_of_match[] = {
>> +{ .compatible = "mediatek,mt6360-regulator", },
>> +{ /* sentinel */ },
>> +};
>> +MODULE_DEVICE_TABLE(of, mt6360_of_match); #endif
>> +
>>  static struct platform_driver mt6360_regulator_driver = {
>>  .driver = {
>>  .name = "mt6360-regulator",
>> +.of_match_table = of_match_ptr(mt6360_of_match),
>>  },
>>  .probe = mt6360_regulator_probe,
>>  .id_table = mt6360_regulator_id_table,
>> --
>> 2.29.2
> ************* Email Confidentiality Notice ********************
> 
> The information contained in this e-mail message (including any attachments) may be confidential, proprietary, privileged, or otherwise exempt from disclosure under applicable laws. It is intended to be conveyed only to the designated recipient(s). Any use, dissemination, distribution, printing, retaining or copying of this e-mail (including its attachments) by unintended recipient(s) is strictly prohibited and may be unlawful. If you are not an intended recipient of this e-mail, or believe that you have received this e-mail in error, please notify the sender immediately (by replying to this e-mail), delete any and all copies of this e-mail (including any attachments) from your system, and do not disclose the content of this e-mail to any other person. Thank you!
> 


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

* Re: [PATCH v2 1/3] regulator: mt6360: Add OF match table
@ 2021-01-11 14:42     ` Matthias Brugger
  0 siblings, 0 replies; 39+ messages in thread
From: Matthias Brugger @ 2021-01-11 14:42 UTC (permalink / raw)
  To: gene_chen(陳俊宇),
	matthias.bgg, Liam Girdwood, Mark Brown
  Cc: Axel Lin, Matti Vaittinen, linux-kernel, linux-mediatek,
	Hsin-Hsiung Wang, Matthias Brugger, Chen Zhong, linux-arm-kernel



On 11/01/2021 03:18, gene_chen(陳俊宇) wrote:
> [ Internal Use - External ]
> 
> Hi Matthias,
> 
> I discussed OF match table with Mark in previous mail in our PATCH v3,
> MFD should just instantiate the platform device.
> 
>> Mark Brown <broonie@kernel.org> 於 2020年8月20日 週四 下午7:45寫道:
> 
>>> This device only exists in the context of a single parent device, there
>>> should be no need for a compatible string here - this is just a detail
>>> of how Linux does things.  The MFD should just instntiate the platform
>>> device.
> 
>> Trying to autoload module without of_id_table will cause run-time error:
>> ueventd: LoadWithAliases was unable to load
>> of:NregulatorT(null)Cmediatek,mt6360-regulator
> 
> You shouldn't have this described in the device tree at all, like I say
> the MFD should just instantiate the platform device.
> 

Well with the patch you send to enable regulators [1]  you use OF_MFD_CELL. So
my understanding is, if you don't provide an of_match_table in the regulator
driver, the loading via udev is broken (like you mentioned in the cite from an
older email).

Regards,
Matthias

[1]
https://lore.kernel.org/linux-mediatek/1605177598-23501-5-git-send-email-gene.chen.richtek@gmail.com/

>> -----Original Message-----
>> From: matthias.bgg@kernel.org <matthias.bgg@kernel.org>
>> Sent: Saturday, January 9, 2021 7:26 PM
>> To: Liam Girdwood <lgirdwood@gmail.com>; Mark Brown
>> <broonie@kernel.org>
>> Cc: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>; Axel Lin
>> <axel.lin@ingics.com>; Chen Zhong <chen.zhong@mediatek.com>;
>> gene_chen(陳俊宇) <gene_chen@richtek.com>; linux-kernel@vger.kernel.org;
>> linux-mediatek@lists.infradead.org; linux-arm-kernel@lists.infradead.org;
>> Matthias Brugger <matthias.bgg@gmail.com>; Matti Vaittinen
>> <matti.vaittinen@fi.rohmeurope.com>; Matthias Brugger
>> <mbrugger@suse.com>
>> Subject: [PATCH v2 1/3] regulator: mt6360: Add OF match table
>>
>> From: Matthias Brugger <mbrugger@suse.com>
>>
>> Binding documentation mentions that a compatible is required for the
>> MT6360 device node, but the driver doesn't provide a OF match table.
>>
>> Fixes: d321571d5e4c ("regulator: mt6360: Add support for MT6360 regulator")
>> Signed-off-by: Matthias Brugger <mbrugger@suse.com>
>>
>> ---
>>
>> Changes in v2:
>> - check for CONFIG_OF
>> - add Fixes tag
>>
>>  drivers/regulator/mt6360-regulator.c | 9 +++++++++
>>  1 file changed, 9 insertions(+)
>>
>> diff --git a/drivers/regulator/mt6360-regulator.c
>> b/drivers/regulator/mt6360-regulator.c
>> index 15308ee29c13..f7b2514feabf 100644
>> --- a/drivers/regulator/mt6360-regulator.c
>> +++ b/drivers/regulator/mt6360-regulator.c
>> @@ -445,9 +445,18 @@ static const struct platform_device_id
>> mt6360_regulator_id_table[] = {  };  MODULE_DEVICE_TABLE(platform,
>> mt6360_regulator_id_table);
>>
>> +#ifdef CONFIG_OF
>> +static const struct of_device_id mt6360_of_match[] = {
>> +{ .compatible = "mediatek,mt6360-regulator", },
>> +{ /* sentinel */ },
>> +};
>> +MODULE_DEVICE_TABLE(of, mt6360_of_match); #endif
>> +
>>  static struct platform_driver mt6360_regulator_driver = {
>>  .driver = {
>>  .name = "mt6360-regulator",
>> +.of_match_table = of_match_ptr(mt6360_of_match),
>>  },
>>  .probe = mt6360_regulator_probe,
>>  .id_table = mt6360_regulator_id_table,
>> --
>> 2.29.2
> ************* Email Confidentiality Notice ********************
> 
> The information contained in this e-mail message (including any attachments) may be confidential, proprietary, privileged, or otherwise exempt from disclosure under applicable laws. It is intended to be conveyed only to the designated recipient(s). Any use, dissemination, distribution, printing, retaining or copying of this e-mail (including its attachments) by unintended recipient(s) is strictly prohibited and may be unlawful. If you are not an intended recipient of this e-mail, or believe that you have received this e-mail in error, please notify the sender immediately (by replying to this e-mail), delete any and all copies of this e-mail (including any attachments) from your system, and do not disclose the content of this e-mail to any other person. Thank you!
> 


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH v2 1/3] regulator: mt6360: Add OF match table
@ 2021-01-11 14:42     ` Matthias Brugger
  0 siblings, 0 replies; 39+ messages in thread
From: Matthias Brugger @ 2021-01-11 14:42 UTC (permalink / raw)
  To: gene_chen(陳俊宇),
	matthias.bgg, Liam Girdwood, Mark Brown
  Cc: Axel Lin, Matti Vaittinen, linux-kernel, linux-mediatek,
	Hsin-Hsiung Wang, Matthias Brugger, Chen Zhong, linux-arm-kernel



On 11/01/2021 03:18, gene_chen(陳俊宇) wrote:
> [ Internal Use - External ]
> 
> Hi Matthias,
> 
> I discussed OF match table with Mark in previous mail in our PATCH v3,
> MFD should just instantiate the platform device.
> 
>> Mark Brown <broonie@kernel.org> 於 2020年8月20日 週四 下午7:45寫道:
> 
>>> This device only exists in the context of a single parent device, there
>>> should be no need for a compatible string here - this is just a detail
>>> of how Linux does things.  The MFD should just instntiate the platform
>>> device.
> 
>> Trying to autoload module without of_id_table will cause run-time error:
>> ueventd: LoadWithAliases was unable to load
>> of:NregulatorT(null)Cmediatek,mt6360-regulator
> 
> You shouldn't have this described in the device tree at all, like I say
> the MFD should just instantiate the platform device.
> 

Well with the patch you send to enable regulators [1]  you use OF_MFD_CELL. So
my understanding is, if you don't provide an of_match_table in the regulator
driver, the loading via udev is broken (like you mentioned in the cite from an
older email).

Regards,
Matthias

[1]
https://lore.kernel.org/linux-mediatek/1605177598-23501-5-git-send-email-gene.chen.richtek@gmail.com/

>> -----Original Message-----
>> From: matthias.bgg@kernel.org <matthias.bgg@kernel.org>
>> Sent: Saturday, January 9, 2021 7:26 PM
>> To: Liam Girdwood <lgirdwood@gmail.com>; Mark Brown
>> <broonie@kernel.org>
>> Cc: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>; Axel Lin
>> <axel.lin@ingics.com>; Chen Zhong <chen.zhong@mediatek.com>;
>> gene_chen(陳俊宇) <gene_chen@richtek.com>; linux-kernel@vger.kernel.org;
>> linux-mediatek@lists.infradead.org; linux-arm-kernel@lists.infradead.org;
>> Matthias Brugger <matthias.bgg@gmail.com>; Matti Vaittinen
>> <matti.vaittinen@fi.rohmeurope.com>; Matthias Brugger
>> <mbrugger@suse.com>
>> Subject: [PATCH v2 1/3] regulator: mt6360: Add OF match table
>>
>> From: Matthias Brugger <mbrugger@suse.com>
>>
>> Binding documentation mentions that a compatible is required for the
>> MT6360 device node, but the driver doesn't provide a OF match table.
>>
>> Fixes: d321571d5e4c ("regulator: mt6360: Add support for MT6360 regulator")
>> Signed-off-by: Matthias Brugger <mbrugger@suse.com>
>>
>> ---
>>
>> Changes in v2:
>> - check for CONFIG_OF
>> - add Fixes tag
>>
>>  drivers/regulator/mt6360-regulator.c | 9 +++++++++
>>  1 file changed, 9 insertions(+)
>>
>> diff --git a/drivers/regulator/mt6360-regulator.c
>> b/drivers/regulator/mt6360-regulator.c
>> index 15308ee29c13..f7b2514feabf 100644
>> --- a/drivers/regulator/mt6360-regulator.c
>> +++ b/drivers/regulator/mt6360-regulator.c
>> @@ -445,9 +445,18 @@ static const struct platform_device_id
>> mt6360_regulator_id_table[] = {  };  MODULE_DEVICE_TABLE(platform,
>> mt6360_regulator_id_table);
>>
>> +#ifdef CONFIG_OF
>> +static const struct of_device_id mt6360_of_match[] = {
>> +{ .compatible = "mediatek,mt6360-regulator", },
>> +{ /* sentinel */ },
>> +};
>> +MODULE_DEVICE_TABLE(of, mt6360_of_match); #endif
>> +
>>  static struct platform_driver mt6360_regulator_driver = {
>>  .driver = {
>>  .name = "mt6360-regulator",
>> +.of_match_table = of_match_ptr(mt6360_of_match),
>>  },
>>  .probe = mt6360_regulator_probe,
>>  .id_table = mt6360_regulator_id_table,
>> --
>> 2.29.2
> ************* Email Confidentiality Notice ********************
> 
> The information contained in this e-mail message (including any attachments) may be confidential, proprietary, privileged, or otherwise exempt from disclosure under applicable laws. It is intended to be conveyed only to the designated recipient(s). Any use, dissemination, distribution, printing, retaining or copying of this e-mail (including its attachments) by unintended recipient(s) is strictly prohibited and may be unlawful. If you are not an intended recipient of this e-mail, or believe that you have received this e-mail in error, please notify the sender immediately (by replying to this e-mail), delete any and all copies of this e-mail (including any attachments) from your system, and do not disclose the content of this e-mail to any other person. Thank you!
> 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2 1/3] regulator: mt6360: Add OF match table
  2021-01-09 11:26 ` matthias.bgg
  (?)
@ 2021-01-11 16:41   ` Mark Brown
  -1 siblings, 0 replies; 39+ messages in thread
From: Mark Brown @ 2021-01-11 16:41 UTC (permalink / raw)
  To: matthias.bgg
  Cc: Liam Girdwood, Hsin-Hsiung Wang, Axel Lin, Chen Zhong, Gene Chen,
	linux-kernel, linux-mediatek, linux-arm-kernel, Matthias Brugger,
	Matti Vaittinen, Matthias Brugger

[-- Attachment #1: Type: text/plain, Size: 505 bytes --]

On Sat, Jan 09, 2021 at 12:26:09PM +0100, matthias.bgg@kernel.org wrote:
> From: Matthias Brugger <mbrugger@suse.com>
> 
> Binding documentation mentions that a compatible is required for the
> MT6360 device node, but the driver doesn't provide a OF match table.

The binding should be fixed to remove the requirement for a compatible
here, this is both redundant since we already know we have a mt6380 from
the core MFD and encoding details of how Linux implements things into
the DT bindings.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH v2 1/3] regulator: mt6360: Add OF match table
@ 2021-01-11 16:41   ` Mark Brown
  0 siblings, 0 replies; 39+ messages in thread
From: Mark Brown @ 2021-01-11 16:41 UTC (permalink / raw)
  To: matthias.bgg
  Cc: Gene Chen, Matthias Brugger, Axel Lin, Matti Vaittinen,
	Liam Girdwood, linux-kernel, linux-mediatek, linux-arm-kernel,
	Matthias Brugger, Chen Zhong, Hsin-Hsiung Wang


[-- Attachment #1.1: Type: text/plain, Size: 505 bytes --]

On Sat, Jan 09, 2021 at 12:26:09PM +0100, matthias.bgg@kernel.org wrote:
> From: Matthias Brugger <mbrugger@suse.com>
> 
> Binding documentation mentions that a compatible is required for the
> MT6360 device node, but the driver doesn't provide a OF match table.

The binding should be fixed to remove the requirement for a compatible
here, this is both redundant since we already know we have a mt6380 from
the core MFD and encoding details of how Linux implements things into
the DT bindings.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH v2 1/3] regulator: mt6360: Add OF match table
@ 2021-01-11 16:41   ` Mark Brown
  0 siblings, 0 replies; 39+ messages in thread
From: Mark Brown @ 2021-01-11 16:41 UTC (permalink / raw)
  To: matthias.bgg
  Cc: Gene Chen, Matthias Brugger, Axel Lin, Matti Vaittinen,
	Liam Girdwood, linux-kernel, linux-mediatek, linux-arm-kernel,
	Matthias Brugger, Chen Zhong, Hsin-Hsiung Wang


[-- Attachment #1.1: Type: text/plain, Size: 505 bytes --]

On Sat, Jan 09, 2021 at 12:26:09PM +0100, matthias.bgg@kernel.org wrote:
> From: Matthias Brugger <mbrugger@suse.com>
> 
> Binding documentation mentions that a compatible is required for the
> MT6360 device node, but the driver doesn't provide a OF match table.

The binding should be fixed to remove the requirement for a compatible
here, this is both redundant since we already know we have a mt6380 from
the core MFD and encoding details of how Linux implements things into
the DT bindings.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2 1/3] regulator: mt6360: Add OF match table
  2021-01-11 16:41   ` Mark Brown
  (?)
@ 2021-01-12  9:54     ` Matthias Brugger
  -1 siblings, 0 replies; 39+ messages in thread
From: Matthias Brugger @ 2021-01-12  9:54 UTC (permalink / raw)
  To: Mark Brown
  Cc: Gene Chen, Matthias Brugger, Axel Lin, Matti Vaittinen,
	Liam Girdwood, linux-kernel, linux-mediatek, linux-arm-kernel,
	Matthias Brugger, Chen Zhong, Hsin-Hsiung Wang

On Mon, Jan 11, 2021 at 04:41:18PM +0000, Mark Brown wrote:
> On Sat, Jan 09, 2021 at 12:26:09PM +0100, matthias.bgg@kernel.org wrote:
> > From: Matthias Brugger <mbrugger@suse.com>
> > 
> > Binding documentation mentions that a compatible is required for the
> > MT6360 device node, but the driver doesn't provide a OF match table.
> 
> The binding should be fixed to remove the requirement for a compatible
> here, this is both redundant since we already know we have a mt6380 from
> the core MFD and encoding details of how Linux implements things into
> the DT bindings.

Ok, I'll leave that to the driver author to fix this.
Just be aware that there is series for the MFD part which adds
OF_MFD_CELL for the regulator.

Regards,
Matthias

> _______________________________________________
> Linux-mediatek mailing list
> Linux-mediatek@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-mediatek


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

* Re: [PATCH v2 1/3] regulator: mt6360: Add OF match table
@ 2021-01-12  9:54     ` Matthias Brugger
  0 siblings, 0 replies; 39+ messages in thread
From: Matthias Brugger @ 2021-01-12  9:54 UTC (permalink / raw)
  To: Mark Brown
  Cc: Gene Chen, Matthias Brugger, Axel Lin, Matti Vaittinen,
	Liam Girdwood, linux-kernel, linux-mediatek, Hsin-Hsiung Wang,
	Matthias Brugger, Chen Zhong, linux-arm-kernel

On Mon, Jan 11, 2021 at 04:41:18PM +0000, Mark Brown wrote:
> On Sat, Jan 09, 2021 at 12:26:09PM +0100, matthias.bgg@kernel.org wrote:
> > From: Matthias Brugger <mbrugger@suse.com>
> > 
> > Binding documentation mentions that a compatible is required for the
> > MT6360 device node, but the driver doesn't provide a OF match table.
> 
> The binding should be fixed to remove the requirement for a compatible
> here, this is both redundant since we already know we have a mt6380 from
> the core MFD and encoding details of how Linux implements things into
> the DT bindings.

Ok, I'll leave that to the driver author to fix this.
Just be aware that there is series for the MFD part which adds
OF_MFD_CELL for the regulator.

Regards,
Matthias

> _______________________________________________
> Linux-mediatek mailing list
> Linux-mediatek@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-mediatek


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

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

* Re: [PATCH v2 1/3] regulator: mt6360: Add OF match table
@ 2021-01-12  9:54     ` Matthias Brugger
  0 siblings, 0 replies; 39+ messages in thread
From: Matthias Brugger @ 2021-01-12  9:54 UTC (permalink / raw)
  To: Mark Brown
  Cc: Gene Chen, Matthias Brugger, Axel Lin, Matti Vaittinen,
	Liam Girdwood, linux-kernel, linux-mediatek, Hsin-Hsiung Wang,
	Matthias Brugger, Chen Zhong, linux-arm-kernel

On Mon, Jan 11, 2021 at 04:41:18PM +0000, Mark Brown wrote:
> On Sat, Jan 09, 2021 at 12:26:09PM +0100, matthias.bgg@kernel.org wrote:
> > From: Matthias Brugger <mbrugger@suse.com>
> > 
> > Binding documentation mentions that a compatible is required for the
> > MT6360 device node, but the driver doesn't provide a OF match table.
> 
> The binding should be fixed to remove the requirement for a compatible
> here, this is both redundant since we already know we have a mt6380 from
> the core MFD and encoding details of how Linux implements things into
> the DT bindings.

Ok, I'll leave that to the driver author to fix this.
Just be aware that there is series for the MFD part which adds
OF_MFD_CELL for the regulator.

Regards,
Matthias

> _______________________________________________
> Linux-mediatek mailing list
> Linux-mediatek@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-mediatek


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2021-01-12 10:00 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-09 11:26 [PATCH v2 1/3] regulator: mt6360: Add OF match table matthias.bgg
2021-01-09 11:26 ` matthias.bgg
2021-01-09 11:26 ` matthias.bgg
2021-01-09 11:26 ` [PATCH v2 2/3] regulator: mt6358: " matthias.bgg
2021-01-09 11:26   ` matthias.bgg
2021-01-09 11:26   ` matthias.bgg
2021-01-09 11:26 ` [PATCH v2 3/3] regulator: mt6323: " matthias.bgg
2021-01-09 11:26   ` matthias.bgg
2021-01-09 11:26   ` matthias.bgg
2021-01-09 16:44   ` Aw: " Frank Wunderlich
2021-01-09 16:44     ` Frank Wunderlich
2021-01-09 16:44     ` Frank Wunderlich
2021-01-10 18:48     ` Matthias Brugger
2021-01-10 18:48       ` Matthias Brugger
2021-01-10 18:48       ` Matthias Brugger
2021-01-11  2:18 ` [PATCH v2 1/3] regulator: mt6360: " gene_chen(陳俊宇)
2021-01-11  2:18   ` gene_chen(陳俊宇)
2021-01-11  2:18   ` gene_chen(陳俊宇)
2021-01-11 10:08   ` Matthias Brugger
2021-01-11 10:08     ` Matthias Brugger
2021-01-11 10:08     ` Matthias Brugger
2021-01-11 10:32     ` Vaittinen, Matti
2021-01-11 10:32       ` Vaittinen, Matti
2021-01-11 10:32       ` Vaittinen, Matti
2021-01-11 12:38       ` Matthias Brugger
2021-01-11 12:38         ` Matthias Brugger
2021-01-11 12:38         ` Matthias Brugger
2021-01-11 12:53         ` Vaittinen, Matti
2021-01-11 12:53           ` Vaittinen, Matti
2021-01-11 12:53           ` Vaittinen, Matti
2021-01-11 14:42   ` Matthias Brugger
2021-01-11 14:42     ` Matthias Brugger
2021-01-11 14:42     ` Matthias Brugger
2021-01-11 16:41 ` Mark Brown
2021-01-11 16:41   ` Mark Brown
2021-01-11 16:41   ` Mark Brown
2021-01-12  9:54   ` Matthias Brugger
2021-01-12  9:54     ` Matthias Brugger
2021-01-12  9:54     ` Matthias Brugger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.