All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] clk: samsung: exynos-clkout: Remove misleading of_match_table/MODULE_DEVICE_TABLE
       [not found] <CGME20240426092626eucas1p23da5ce328d98bc13e721c2c88caa2247@eucas1p2.samsung.com>
@ 2024-04-26  9:26   ` Marek Szyprowski
  0 siblings, 0 replies; 4+ messages in thread
From: Marek Szyprowski @ 2024-04-26  9:26 UTC (permalink / raw
  To: linux-samsung-soc, linux-clk, linux-arm-kernel
  Cc: Marek Szyprowski, Krzysztof Kozlowski, Sylwester Nawrocki,
	Chanwoo Choi, Alim Akhtar, Michael Turquette, Stephen Boyd,
	Rob Herring, David Lechner, Bjorn Andersson, Dmitry Baryshkov

Since commit 9484f2cb8332 ("clk: samsung: exynos-clkout: convert to
module driver") this driver is instantiated as MFD-cell (matched by
platform device name) not as a real platform device created by OF code.
Remove of_match_table and change related MODULE_DEVICE_TABLE to simple
MODULE_ALIAS to avoid further confusion.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 drivers/clk/samsung/clk-exynos-clkout.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/clk/samsung/clk-exynos-clkout.c b/drivers/clk/samsung/clk-exynos-clkout.c
index 503c6f5b20d5..e2968784d307 100644
--- a/drivers/clk/samsung/clk-exynos-clkout.c
+++ b/drivers/clk/samsung/clk-exynos-clkout.c
@@ -75,7 +75,6 @@ static const struct of_device_id exynos_clkout_ids[] = {
 		.data = &exynos_clkout_exynos5,
 	}, { }
 };
-MODULE_DEVICE_TABLE(of, exynos_clkout_ids);
 
 /*
  * Device will be instantiated as child of PMU device without its own
@@ -237,7 +236,6 @@ static SIMPLE_DEV_PM_OPS(exynos_clkout_pm_ops, exynos_clkout_suspend,
 static struct platform_driver exynos_clkout_driver = {
 	.driver = {
 		.name = "exynos-clkout",
-		.of_match_table = exynos_clkout_ids,
 		.pm = &exynos_clkout_pm_ops,
 	},
 	.probe = exynos_clkout_probe,
@@ -248,4 +246,5 @@ module_platform_driver(exynos_clkout_driver);
 MODULE_AUTHOR("Krzysztof Kozlowski <krzk@kernel.org>");
 MODULE_AUTHOR("Tomasz Figa <tomasz.figa@gmail.com>");
 MODULE_DESCRIPTION("Samsung Exynos clock output driver");
+MODULE_ALIAS("platform:exynos-clkout");
 MODULE_LICENSE("GPL");
-- 
2.34.1


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

* [PATCH v2] clk: samsung: exynos-clkout: Remove misleading of_match_table/MODULE_DEVICE_TABLE
@ 2024-04-26  9:26   ` Marek Szyprowski
  0 siblings, 0 replies; 4+ messages in thread
From: Marek Szyprowski @ 2024-04-26  9:26 UTC (permalink / raw
  To: linux-samsung-soc, linux-clk, linux-arm-kernel
  Cc: Marek Szyprowski, Krzysztof Kozlowski, Sylwester Nawrocki,
	Chanwoo Choi, Alim Akhtar, Michael Turquette, Stephen Boyd,
	Rob Herring, David Lechner, Bjorn Andersson, Dmitry Baryshkov

Since commit 9484f2cb8332 ("clk: samsung: exynos-clkout: convert to
module driver") this driver is instantiated as MFD-cell (matched by
platform device name) not as a real platform device created by OF code.
Remove of_match_table and change related MODULE_DEVICE_TABLE to simple
MODULE_ALIAS to avoid further confusion.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 drivers/clk/samsung/clk-exynos-clkout.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/clk/samsung/clk-exynos-clkout.c b/drivers/clk/samsung/clk-exynos-clkout.c
index 503c6f5b20d5..e2968784d307 100644
--- a/drivers/clk/samsung/clk-exynos-clkout.c
+++ b/drivers/clk/samsung/clk-exynos-clkout.c
@@ -75,7 +75,6 @@ static const struct of_device_id exynos_clkout_ids[] = {
 		.data = &exynos_clkout_exynos5,
 	}, { }
 };
-MODULE_DEVICE_TABLE(of, exynos_clkout_ids);
 
 /*
  * Device will be instantiated as child of PMU device without its own
@@ -237,7 +236,6 @@ static SIMPLE_DEV_PM_OPS(exynos_clkout_pm_ops, exynos_clkout_suspend,
 static struct platform_driver exynos_clkout_driver = {
 	.driver = {
 		.name = "exynos-clkout",
-		.of_match_table = exynos_clkout_ids,
 		.pm = &exynos_clkout_pm_ops,
 	},
 	.probe = exynos_clkout_probe,
@@ -248,4 +246,5 @@ module_platform_driver(exynos_clkout_driver);
 MODULE_AUTHOR("Krzysztof Kozlowski <krzk@kernel.org>");
 MODULE_AUTHOR("Tomasz Figa <tomasz.figa@gmail.com>");
 MODULE_DESCRIPTION("Samsung Exynos clock output driver");
+MODULE_ALIAS("platform:exynos-clkout");
 MODULE_LICENSE("GPL");
-- 
2.34.1


_______________________________________________
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] 4+ messages in thread

* Re: [PATCH v2] clk: samsung: exynos-clkout: Remove misleading of_match_table/MODULE_DEVICE_TABLE
  2024-04-26  9:26   ` Marek Szyprowski
@ 2024-05-01 16:49     ` William McVicker
  -1 siblings, 0 replies; 4+ messages in thread
From: William McVicker @ 2024-05-01 16:49 UTC (permalink / raw
  To: Marek Szyprowski
  Cc: linux-samsung-soc, linux-clk, linux-arm-kernel,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Alim Akhtar, Michael Turquette, Stephen Boyd, Rob Herring,
	David Lechner, Bjorn Andersson, Dmitry Baryshkov

On 04/26/2024, Marek Szyprowski wrote:
> Since commit 9484f2cb8332 ("clk: samsung: exynos-clkout: convert to
> module driver") this driver is instantiated as MFD-cell (matched by
> platform device name) not as a real platform device created by OF code.
> Remove of_match_table and change related MODULE_DEVICE_TABLE to simple
> MODULE_ALIAS to avoid further confusion.
> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>  drivers/clk/samsung/clk-exynos-clkout.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/clk/samsung/clk-exynos-clkout.c b/drivers/clk/samsung/clk-exynos-clkout.c
> index 503c6f5b20d5..e2968784d307 100644
> --- a/drivers/clk/samsung/clk-exynos-clkout.c
> +++ b/drivers/clk/samsung/clk-exynos-clkout.c
> @@ -75,7 +75,6 @@ static const struct of_device_id exynos_clkout_ids[] = {
>  		.data = &exynos_clkout_exynos5,
>  	}, { }
>  };
> -MODULE_DEVICE_TABLE(of, exynos_clkout_ids);
>  
>  /*
>   * Device will be instantiated as child of PMU device without its own
> @@ -237,7 +236,6 @@ static SIMPLE_DEV_PM_OPS(exynos_clkout_pm_ops, exynos_clkout_suspend,
>  static struct platform_driver exynos_clkout_driver = {
>  	.driver = {
>  		.name = "exynos-clkout",
> -		.of_match_table = exynos_clkout_ids,
>  		.pm = &exynos_clkout_pm_ops,
>  	},
>  	.probe = exynos_clkout_probe,
> @@ -248,4 +246,5 @@ module_platform_driver(exynos_clkout_driver);
>  MODULE_AUTHOR("Krzysztof Kozlowski <krzk@kernel.org>");
>  MODULE_AUTHOR("Tomasz Figa <tomasz.figa@gmail.com>");
>  MODULE_DESCRIPTION("Samsung Exynos clock output driver");
> +MODULE_ALIAS("platform:exynos-clkout");

As mentioned by Krzysztof in v1, please create a `platform_device_id` table so
that this is scalable in case we need to add other aliases in the future. For
example, something like this:


static const struct platform_device_id exynos_clkout_platform_ids[] = {
	{ "exynos-clkout" },
	{}
};
MODULE_DEVICE_TABLE(platform, exynos_clkout_platform_ids);

static struct platform_driver exynos_clkout_driver = {
	.driver = {
		.name = "exynos-clkout",
		.pm = &exynos_clkout_pm_ops,
	},
	.probe = exynos_clkout_probe,
	.id_table = exynos_clkout_platform_ids,
...


Thanks,
Will

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

* Re: [PATCH v2] clk: samsung: exynos-clkout: Remove misleading of_match_table/MODULE_DEVICE_TABLE
@ 2024-05-01 16:49     ` William McVicker
  0 siblings, 0 replies; 4+ messages in thread
From: William McVicker @ 2024-05-01 16:49 UTC (permalink / raw
  To: Marek Szyprowski
  Cc: linux-samsung-soc, linux-clk, linux-arm-kernel,
	Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
	Alim Akhtar, Michael Turquette, Stephen Boyd, Rob Herring,
	David Lechner, Bjorn Andersson, Dmitry Baryshkov

On 04/26/2024, Marek Szyprowski wrote:
> Since commit 9484f2cb8332 ("clk: samsung: exynos-clkout: convert to
> module driver") this driver is instantiated as MFD-cell (matched by
> platform device name) not as a real platform device created by OF code.
> Remove of_match_table and change related MODULE_DEVICE_TABLE to simple
> MODULE_ALIAS to avoid further confusion.
> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>  drivers/clk/samsung/clk-exynos-clkout.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/clk/samsung/clk-exynos-clkout.c b/drivers/clk/samsung/clk-exynos-clkout.c
> index 503c6f5b20d5..e2968784d307 100644
> --- a/drivers/clk/samsung/clk-exynos-clkout.c
> +++ b/drivers/clk/samsung/clk-exynos-clkout.c
> @@ -75,7 +75,6 @@ static const struct of_device_id exynos_clkout_ids[] = {
>  		.data = &exynos_clkout_exynos5,
>  	}, { }
>  };
> -MODULE_DEVICE_TABLE(of, exynos_clkout_ids);
>  
>  /*
>   * Device will be instantiated as child of PMU device without its own
> @@ -237,7 +236,6 @@ static SIMPLE_DEV_PM_OPS(exynos_clkout_pm_ops, exynos_clkout_suspend,
>  static struct platform_driver exynos_clkout_driver = {
>  	.driver = {
>  		.name = "exynos-clkout",
> -		.of_match_table = exynos_clkout_ids,
>  		.pm = &exynos_clkout_pm_ops,
>  	},
>  	.probe = exynos_clkout_probe,
> @@ -248,4 +246,5 @@ module_platform_driver(exynos_clkout_driver);
>  MODULE_AUTHOR("Krzysztof Kozlowski <krzk@kernel.org>");
>  MODULE_AUTHOR("Tomasz Figa <tomasz.figa@gmail.com>");
>  MODULE_DESCRIPTION("Samsung Exynos clock output driver");
> +MODULE_ALIAS("platform:exynos-clkout");

As mentioned by Krzysztof in v1, please create a `platform_device_id` table so
that this is scalable in case we need to add other aliases in the future. For
example, something like this:


static const struct platform_device_id exynos_clkout_platform_ids[] = {
	{ "exynos-clkout" },
	{}
};
MODULE_DEVICE_TABLE(platform, exynos_clkout_platform_ids);

static struct platform_driver exynos_clkout_driver = {
	.driver = {
		.name = "exynos-clkout",
		.pm = &exynos_clkout_pm_ops,
	},
	.probe = exynos_clkout_probe,
	.id_table = exynos_clkout_platform_ids,
...


Thanks,
Will

_______________________________________________
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] 4+ messages in thread

end of thread, other threads:[~2024-05-01 16:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CGME20240426092626eucas1p23da5ce328d98bc13e721c2c88caa2247@eucas1p2.samsung.com>
2024-04-26  9:26 ` [PATCH v2] clk: samsung: exynos-clkout: Remove misleading of_match_table/MODULE_DEVICE_TABLE Marek Szyprowski
2024-04-26  9:26   ` Marek Szyprowski
2024-05-01 16:49   ` William McVicker
2024-05-01 16:49     ` William McVicker

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.