From: Anson Huang <Anson.Huang@nxp.com>
To: aisheng.dong@nxp.com, festevam@gmail.com, shawnguo@kernel.org,
stefan@agner.ch, kernel@pengutronix.de, linus.walleij@linaro.org,
s.hauer@pengutronix.de, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Cc: Linux-imx@nxp.com
Subject: [PATCH V5 2/9] pinctrl: imx: Support building i.MX pinctrl driver as module
Date: Thu, 11 Jun 2020 19:34:48 +0800 [thread overview]
Message-ID: <1591875295-19427-3-git-send-email-Anson.Huang@nxp.com> (raw)
In-Reply-To: <1591875295-19427-1-git-send-email-Anson.Huang@nxp.com>
Export necessary functions to support building i.MX common pinctrl
driver and its user to be built as module.
i.MX common pinctrl driver should depend on CONFIG_OF to make sure
no build error when i.MX common pinctrl driver is enabled for difference
architectures without CONFIG_OF.
Also, module author, description and license should be added.
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
Changes since V4:
- add module author and description.
---
drivers/pinctrl/freescale/Kconfig | 3 ++-
drivers/pinctrl/freescale/pinctrl-imx.c | 7 +++++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/pinctrl/freescale/Kconfig b/drivers/pinctrl/freescale/Kconfig
index a3a30f1d..e281c3f 100644
--- a/drivers/pinctrl/freescale/Kconfig
+++ b/drivers/pinctrl/freescale/Kconfig
@@ -1,6 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-only
config PINCTRL_IMX
- bool
+ tristate "IMX pinctrl driver"
+ depends on OF
select GENERIC_PINCTRL_GROUPS
select GENERIC_PINMUX_FUNCTIONS
select GENERIC_PINCONF
diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c b/drivers/pinctrl/freescale/pinctrl-imx.c
index c1faae1..28be1d6 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx.c
@@ -11,6 +11,7 @@
#include <linux/init.h>
#include <linux/io.h>
#include <linux/mfd/syscon.h>
+#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/of_address.h>
@@ -878,6 +879,7 @@ int imx_pinctrl_probe(struct platform_device *pdev,
return pinctrl_enable(ipctl->pctl);
}
+EXPORT_SYMBOL_GPL(imx_pinctrl_probe);
static int __maybe_unused imx_pinctrl_suspend(struct device *dev)
{
@@ -897,3 +899,8 @@ const struct dev_pm_ops imx_pinctrl_pm_ops = {
SET_LATE_SYSTEM_SLEEP_PM_OPS(imx_pinctrl_suspend,
imx_pinctrl_resume)
};
+EXPORT_SYMBOL_GPL(imx_pinctrl_pm_ops);
+
+MODULE_AUTHOR("Linus Walleij <linus.walleij@linaro.org>");
+MODULE_DESCRIPTION("NXP i.MX common pinctrl driver");
+MODULE_LICENSE("GPL v2");
--
2.7.4
next prev parent reply other threads:[~2020-06-11 11:46 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-11 11:34 [PATCH V5 0/9] Support i.MX8 SoCs pinctrl drivers built as module Anson Huang
2020-06-11 11:34 ` [PATCH V5 1/9] pinctrl: imx: Support building SCU pinctrl driver " Anson Huang
2020-06-16 9:19 ` Aisheng Dong
2020-06-16 10:44 ` Anson Huang
2020-06-17 2:59 ` Aisheng Dong
2020-06-17 3:19 ` Anson Huang
2020-06-17 10:29 ` Aisheng Dong
2020-06-17 13:43 ` Anson Huang
2020-06-11 11:34 ` Anson Huang [this message]
2020-06-11 11:34 ` [PATCH V5 3/9] pinctrl: imx8mm: Support building " Anson Huang
2020-06-11 11:34 ` [PATCH V5 4/9] pinctrl: imx8mn: " Anson Huang
2020-06-11 11:34 ` [PATCH V5 5/9] pinctrl: imx8mq: " Anson Huang
2020-06-11 11:34 ` [PATCH V5 6/9] pinctrl: imx8mp: " Anson Huang
2020-06-11 11:34 ` [PATCH V5 7/9] pinctrl: imx8qxp: " Anson Huang
2020-06-11 11:34 ` [PATCH V5 8/9] pinctrl: imx8qm: " Anson Huang
2020-06-11 11:34 ` [PATCH V5 9/9] pinctrl: imx8dxl: " 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=1591875295-19427-3-git-send-email-Anson.Huang@nxp.com \
--to=anson.huang@nxp.com \
--cc=Linux-imx@nxp.com \
--cc=aisheng.dong@nxp.com \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=stefan@agner.ch \
/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).