linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: mediatek: mt8188: probe vpp with mtk_clk_simple_probe()
@ 2023-10-26 11:38 yu-chang.lee
  2023-10-26 11:45 ` AngeloGioacchino Del Regno
  0 siblings, 1 reply; 5+ messages in thread
From: yu-chang.lee @ 2023-10-26 11:38 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Matthias Brugger
  Cc: AngeloGioacchino Del Regno, Chen-Yu Tsai, Moudy Ho,
	Uwe Kleine-König, linux-clk, linux-kernel, linux-arm-kernel,
	linux-mediatek, Project_Global_Chrome_Upstream_Group,
	yu-chang . lee

switch to the common mtk_clk_simple_probe() function for all of the
clock drivers that are registering as platform drivers.

Signed-off-by: yu-chang.lee <yu-chang.lee@mediatek.com>
---
 drivers/clk/mediatek/clk-mt8188-vpp0.c | 14 +++++++++++---
 drivers/clk/mediatek/clk-mt8188-vpp1.c | 14 +++++++++++---
 2 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/drivers/clk/mediatek/clk-mt8188-vpp0.c b/drivers/clk/mediatek/clk-mt8188-vpp0.c
index e7b02b26fefb..18fffa191ee1 100644
--- a/drivers/clk/mediatek/clk-mt8188-vpp0.c
+++ b/drivers/clk/mediatek/clk-mt8188-vpp0.c
@@ -96,6 +96,15 @@ static const struct mtk_clk_desc vpp0_desc = {
 	.num_clks = ARRAY_SIZE(vpp0_clks),
 };
 
+static const struct of_device_id of_match_clk_mt8188_vpp0[] = {
+	{
+		.compatible = "mediatek,mt8188-vppsys0",
+		.data = &vpp0_desc,
+	}, {
+		/* sentinel */
+	}
+};
+
 static const struct platform_device_id clk_mt8188_vpp0_id_table[] = {
 	{ .name = "clk-mt8188-vpp0", .driver_data = (kernel_ulong_t)&vpp0_desc },
 	{ /* sentinel */ }
@@ -103,12 +112,11 @@ static const struct platform_device_id clk_mt8188_vpp0_id_table[] = {
 MODULE_DEVICE_TABLE(platform, clk_mt8188_vpp0_id_table);
 
 static struct platform_driver clk_mt8188_vpp0_drv = {
-	.probe = mtk_clk_pdev_probe,
-	.remove_new = mtk_clk_pdev_remove,
+	.probe = mtk_clk_simple_probe,
 	.driver = {
 		.name = "clk-mt8188-vpp0",
+		.of_match_table = of_match_clk_mt8188_vpp0,
 	},
-	.id_table = clk_mt8188_vpp0_id_table,
 };
 module_platform_driver(clk_mt8188_vpp0_drv);
 MODULE_LICENSE("GPL");
diff --git a/drivers/clk/mediatek/clk-mt8188-vpp1.c b/drivers/clk/mediatek/clk-mt8188-vpp1.c
index e8f0f7eca097..f4b35336d427 100644
--- a/drivers/clk/mediatek/clk-mt8188-vpp1.c
+++ b/drivers/clk/mediatek/clk-mt8188-vpp1.c
@@ -91,6 +91,15 @@ static const struct mtk_clk_desc vpp1_desc = {
 	.num_clks = ARRAY_SIZE(vpp1_clks),
 };
 
+static const struct of_device_id of_match_clk_mt8188_vpp1[] = {
+	{
+		.compatible = "mediatek,mt8188-vppsys1",
+		.data = &vpp1_desc,
+	}, {
+		/* sentinel */
+	}
+};
+
 static const struct platform_device_id clk_mt8188_vpp1_id_table[] = {
 	{ .name = "clk-mt8188-vpp1", .driver_data = (kernel_ulong_t)&vpp1_desc },
 	{ /* sentinel */ }
@@ -98,12 +107,11 @@ static const struct platform_device_id clk_mt8188_vpp1_id_table[] = {
 MODULE_DEVICE_TABLE(platform, clk_mt8188_vpp1_id_table);
 
 static struct platform_driver clk_mt8188_vpp1_drv = {
-	.probe = mtk_clk_pdev_probe,
-	.remove_new = mtk_clk_pdev_remove,
+	.probe = mtk_clk_simple_probe,
 	.driver = {
 		.name = "clk-mt8188-vpp1",
+		.of_match_table = of_match_clk_mt8188_vpp1,
 	},
-	.id_table = clk_mt8188_vpp1_id_table,
 };
 module_platform_driver(clk_mt8188_vpp1_drv);
 MODULE_LICENSE("GPL");
-- 
2.18.0


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

end of thread, other threads:[~2023-11-02 11:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-26 11:38 [PATCH] clk: mediatek: mt8188: probe vpp with mtk_clk_simple_probe() yu-chang.lee
2023-10-26 11:45 ` AngeloGioacchino Del Regno
2023-10-27  7:42   ` Yu-chang Lee (李禹璋)
2023-10-27  7:49     ` AngeloGioacchino Del Regno
2023-11-02 11:49       ` Yu-chang Lee (李禹璋)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).