From: Anson Huang <Anson.Huang@nxp.com>
To: mturquette@baylibre.com, sboyd@kernel.org, shawnguo@kernel.org,
s.hauer@pengutronix.de, kernel@pengutronix.de,
festevam@gmail.com, peng.fan@nxp.com, arnd@arndb.de,
abel.vesa@nxp.com, aisheng.dong@nxp.com, fugang.duan@nxp.com,
daniel.baluta@nxp.com, yuehaibing@huawei.com,
sfr@canb.auug.org.au, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Cc: Linux-imx@nxp.com
Subject: [PATCH V4 5/5] clk: imx8qxp: Support building i.MX8QXP clock driver as module
Date: Thu, 2 Jul 2020 10:14:34 +0800 [thread overview]
Message-ID: <1593656074-10092-6-git-send-email-Anson.Huang@nxp.com> (raw)
In-Reply-To: <1593656074-10092-1-git-send-email-Anson.Huang@nxp.com>
Change configuration to "tristate", use device_initcall() instead
of builtin_platform_driver(), add module author, description and
license to support building i.MX8QXP clock drivers as module.
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
Changes since V3:
- use device_initcall() instead of builtin_platform_driver();
- add module author/description;
- link common scu/lpcg clock driver to i.MX8QXP clock driver, then
no need to have exports.
---
drivers/clk/imx/Kconfig | 6 +++---
drivers/clk/imx/Makefile | 9 ++++-----
drivers/clk/imx/clk-imx8qxp-lpcg.c | 10 +++++++++-
drivers/clk/imx/clk-imx8qxp.c | 11 ++++++++++-
4 files changed, 26 insertions(+), 10 deletions(-)
diff --git a/drivers/clk/imx/Kconfig b/drivers/clk/imx/Kconfig
index 1867111..8340dfe 100644
--- a/drivers/clk/imx/Kconfig
+++ b/drivers/clk/imx/Kconfig
@@ -5,8 +5,8 @@ config MXC_CLK
depends on ARCH_MXC
config MXC_CLK_SCU
- bool
- depends on IMX_SCU
+ tristate "IMX SCU clock"
+ depends on ARCH_MXC && IMX_SCU
config CLK_IMX1
bool "IMX1 CCM Clock Driver"
@@ -127,7 +127,7 @@ config CLK_IMX8MQ
Build the driver for i.MX8MQ CCM Clock Driver
config CLK_IMX8QXP
- bool "IMX8QXP SCU Clock"
+ tristate "IMX8QXP SCU Clock"
depends on ARCH_MXC && IMX_SCU && ARM64
select MXC_CLK_SCU
help
diff --git a/drivers/clk/imx/Makefile b/drivers/clk/imx/Makefile
index 17f5d12..79e53f2 100644
--- a/drivers/clk/imx/Makefile
+++ b/drivers/clk/imx/Makefile
@@ -21,15 +21,14 @@ mxc-clk-objs += clk-pll14xx.o
mxc-clk-objs += clk-sscg-pll.o
obj-$(CONFIG_MXC_CLK) += mxc-clk.o
-obj-$(CONFIG_MXC_CLK_SCU) += \
- clk-scu.o \
- clk-lpcg-scu.o
-
obj-$(CONFIG_CLK_IMX8MM) += clk-imx8mm.o
obj-$(CONFIG_CLK_IMX8MN) += clk-imx8mn.o
obj-$(CONFIG_CLK_IMX8MP) += clk-imx8mp.o
obj-$(CONFIG_CLK_IMX8MQ) += clk-imx8mq.o
-obj-$(CONFIG_CLK_IMX8QXP) += clk-imx8qxp.o clk-imx8qxp-lpcg.o
+
+obj-$(CONFIG_MXC_CLK_SCU) += clk-imx-scu.o clk-imx-lpcg-scu.o
+clk-imx-scu-$(CONFIG_CLK_IMX8QXP) += clk-scu.o clk-imx8qxp.o
+clk-imx-lpcg-scu-$(CONFIG_CLK_IMX8QXP) += clk-lpcg-scu.o clk-imx8qxp-lpcg.o
obj-$(CONFIG_CLK_IMX1) += clk-imx1.o
obj-$(CONFIG_CLK_IMX21) += clk-imx21.o
diff --git a/drivers/clk/imx/clk-imx8qxp-lpcg.c b/drivers/clk/imx/clk-imx8qxp-lpcg.c
index 04c8ee3..5b6648e 100644
--- a/drivers/clk/imx/clk-imx8qxp-lpcg.c
+++ b/drivers/clk/imx/clk-imx8qxp-lpcg.c
@@ -231,4 +231,12 @@ static struct platform_driver imx8qxp_lpcg_clk_driver = {
.probe = imx8qxp_lpcg_clk_probe,
};
-builtin_platform_driver(imx8qxp_lpcg_clk_driver);
+static int __init imx8qxp_lpcg_clk_init(void)
+{
+ return platform_driver_register(&imx8qxp_lpcg_clk_driver);
+}
+device_initcall(imx8qxp_lpcg_clk_init);
+
+MODULE_AUTHOR("Aisheng Dong <aisheng.dong@nxp.com>");
+MODULE_DESCRIPTION("NXP i.MX8QXP LPCG clock driver");
+MODULE_LICENSE("GPL v2");
diff --git a/drivers/clk/imx/clk-imx8qxp.c b/drivers/clk/imx/clk-imx8qxp.c
index 5e2903e..9bcf0d1 100644
--- a/drivers/clk/imx/clk-imx8qxp.c
+++ b/drivers/clk/imx/clk-imx8qxp.c
@@ -151,4 +151,13 @@ static struct platform_driver imx8qxp_clk_driver = {
},
.probe = imx8qxp_clk_probe,
};
-builtin_platform_driver(imx8qxp_clk_driver);
+
+static int __init imx8qxp_clk_init(void)
+{
+ return platform_driver_register(&imx8qxp_clk_driver);
+}
+device_initcall(imx8qxp_clk_init);
+
+MODULE_AUTHOR("Aisheng Dong <aisheng.dong@nxp.com>");
+MODULE_DESCRIPTION("NXP i.MX8QXP clock driver");
+MODULE_LICENSE("GPL v2");
--
2.7.4
next prev parent reply other threads:[~2020-07-02 2:18 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-02 2:14 [PATCH V4 0/5] Support building i.MX8 SoCs clock driver as module Anson Huang
2020-07-02 2:14 ` [PATCH V4 1/5] clk: composite: Export clk_hw_register_composite() Anson Huang
2020-07-02 2:14 ` [PATCH V4 2/5] clk: imx: Add clock configuration for ARMv7 platforms Anson Huang
2020-07-02 2:38 ` Aisheng Dong
2020-07-02 2:14 ` [PATCH V4 3/5] clk: imx: Support building i.MX common clock driver as module Anson Huang
2020-07-02 2:50 ` Dong Aisheng
2020-07-02 3:26 ` Anson Huang
2020-07-02 5:38 ` Dong Aisheng
2020-07-02 6:11 ` Anson Huang
2020-07-02 6:25 ` Dong Aisheng
2020-07-02 6:42 ` Anson Huang
2020-07-02 7:03 ` Arnd Bergmann
2020-07-02 7:12 ` Anson Huang
2020-07-02 7:43 ` Arnd Bergmann
2020-07-02 2:14 ` [PATCH V4 4/5] clk: imx8m: Support module build Anson Huang
2020-07-02 2:51 ` Dong Aisheng
2020-07-02 2:14 ` Anson Huang [this message]
2020-07-02 3:17 ` [PATCH V4 5/5] clk: imx8qxp: Support building i.MX8QXP clock driver as module Dong Aisheng
2020-07-02 3:55 ` Anson Huang
2020-07-02 5:29 ` Dong Aisheng
2020-07-02 5:50 ` Anson Huang
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=1593656074-10092-6-git-send-email-Anson.Huang@nxp.com \
--to=anson.huang@nxp.com \
--cc=Linux-imx@nxp.com \
--cc=abel.vesa@nxp.com \
--cc=aisheng.dong@nxp.com \
--cc=arnd@arndb.de \
--cc=daniel.baluta@nxp.com \
--cc=festevam@gmail.com \
--cc=fugang.duan@nxp.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=peng.fan@nxp.com \
--cc=s.hauer@pengutronix.de \
--cc=sboyd@kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=shawnguo@kernel.org \
--cc=yuehaibing@huawei.com \
/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).