From: William McVicker <willmcvicker@google.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Krzysztof Kozlowski <krzk@kernel.org>,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
Chanwoo Choi <cw00.choi@samsung.com>,
Alim Akhtar <alim.akhtar@samsung.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh@kernel.org>,
David Lechner <david@lechnology.com>,
Bjorn Andersson <andersson@kernel.org>,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Subject: Re: [PATCH v2] clk: samsung: exynos-clkout: Remove misleading of_match_table/MODULE_DEVICE_TABLE
Date: Wed, 1 May 2024 09:49:50 -0700 [thread overview]
Message-ID: <ZjJyrkNfWQR3tsGM@google.com> (raw)
In-Reply-To: <20240426092616.4187022-1-m.szyprowski@samsung.com>
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
WARNING: multiple messages have this Message-ID (diff)
From: William McVicker <willmcvicker@google.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Krzysztof Kozlowski <krzk@kernel.org>,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
Chanwoo Choi <cw00.choi@samsung.com>,
Alim Akhtar <alim.akhtar@samsung.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh@kernel.org>,
David Lechner <david@lechnology.com>,
Bjorn Andersson <andersson@kernel.org>,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Subject: Re: [PATCH v2] clk: samsung: exynos-clkout: Remove misleading of_match_table/MODULE_DEVICE_TABLE
Date: Wed, 1 May 2024 09:49:50 -0700 [thread overview]
Message-ID: <ZjJyrkNfWQR3tsGM@google.com> (raw)
In-Reply-To: <20240426092616.4187022-1-m.szyprowski@samsung.com>
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
next prev parent reply other threads:[~2024-05-01 16:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 [this message]
2024-05-01 16:49 ` William McVicker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZjJyrkNfWQR3tsGM@google.com \
--to=willmcvicker@google.com \
--cc=alim.akhtar@samsung.com \
--cc=andersson@kernel.org \
--cc=cw00.choi@samsung.com \
--cc=david@lechnology.com \
--cc=dmitry.baryshkov@linaro.org \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=mturquette@baylibre.com \
--cc=robh@kernel.org \
--cc=s.nawrocki@samsung.com \
--cc=sboyd@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.