From: Stephen Boyd <sboyd@kernel.org>
To: Abel Vesa <abel.vesa@nxp.com>, Anson Huang <anson.huang@nxp.com>,
Fabio Estevam <fabio.estevam@nxp.com>,
Jacky Bai <ping.bai@nxp.com>,
Mike Turquette <mturquette@baylibre.com>,
Sascha Hauer <kernel@pengutronix.de>,
Shawn Guo <shawnguo@kernel.org>
Cc: NXP Linux Team <linux-imx@nxp.com>,
linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Abel Vesa <abel.vesa@nxp.com>
Subject: Re: [PATCH] clk: imx8mm: Switch to platform driver
Date: Tue, 25 Jun 2019 13:39:40 -0700 [thread overview]
Message-ID: <20190625203941.15C94205ED@mail.kernel.org> (raw)
In-Reply-To: <1561373672-3533-1-git-send-email-abel.vesa@nxp.com>
Quoting Abel Vesa (2019-06-24 03:54:32)
> In order to make the clock provider a platform driver
> all the data and code needs to be outside of .init section.
Yes, but why are you making this change in general?
>
> Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
[...]
> @@ -480,7 +481,7 @@ static int __init imx8mm_clocks_init(struct device_node *ccm_node)
> clks[IMX8MM_SYS_PLL2_500M] = imx_clk_fixed_factor("sys_pll2_500m", "sys_pll2_out", 1, 2);
> clks[IMX8MM_SYS_PLL2_1000M] = imx_clk_fixed_factor("sys_pll2_1000m", "sys_pll2_out", 1, 1);
>
> - np = ccm_node;
> + np = dev->of_node;
> base = of_iomap(np, 0);
If we're using platform device here it would be nice to also use
platform device APIs to map memory and request resources, etc.
> if (WARN_ON(!base))
> return -ENOMEM;
> @@ -682,4 +683,19 @@ static int __init imx8mm_clocks_init(struct device_node *ccm_node)
>
> return 0;
> }
> -CLK_OF_DECLARE_DRIVER(imx8mm, "fsl,imx8mm-ccm", imx8mm_clocks_init);
> +
> +static const struct of_device_id imx8mm_clk_of_match[] = {
> + { .compatible = "fsl,imx8mm-ccm" },
> + { /* Sentinel */ },
> +};
> +MODULE_DEVICE_TABLE(of, imx8mm_clk_of_match);
> +
> +
Nitpick: Drop the second newline.
> +static struct platform_driver imx8mm_clk_driver = {
> + .probe = imx8mm_clocks_probe,
> + .driver = {
> + .name = "imx8mm-ccm",
> + .of_match_table = of_match_ptr(imx8mm_clk_of_match),
> + },
> +};
> +module_platform_driver(imx8mm_clk_driver);
prev parent reply other threads:[~2019-06-25 20:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-24 10:54 [PATCH] clk: imx8mm: Switch to platform driver Abel Vesa
2019-06-25 3:41 ` kbuild test robot
2019-06-25 20:39 ` Stephen Boyd [this message]
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=20190625203941.15C94205ED@mail.kernel.org \
--to=sboyd@kernel.org \
--cc=abel.vesa@nxp.com \
--cc=anson.huang@nxp.com \
--cc=fabio.estevam@nxp.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=ping.bai@nxp.com \
--cc=shawnguo@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 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).