diff mbox series

[2/2] pinctrl: imx: Support building i.MX pinctrl driver as module

Message ID 1594912013-20859-2-git-send-email-Anson.Huang@nxp.com (mailing list archive)
State New, archived
Headers show
Series [1/2] pinctrl: imx: Support building SCU pinctrl driver as module | expand

Commit Message

Anson Huang July 16, 2020, 3:06 p.m. UTC
Change PINCTRL_IMX to tristate to support loadable module build.

And 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 different
architectures without CONFIG_OF.

Also add module author, description and license.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
 drivers/pinctrl/freescale/Kconfig       | 3 ++-
 drivers/pinctrl/freescale/pinctrl-imx.c | 5 +++++
 2 files changed, 7 insertions(+), 1 deletion(-)

Comments

Aisheng Dong Sept. 7, 2020, 8:33 a.m. UTC | #1
> From: Anson Huang <Anson.Huang@nxp.com>
> Sent: Thursday, July 16, 2020 11:07 PM
> Subject: [PATCH 2/2] pinctrl: imx: Support building i.MX pinctrl driver as module
> 

S/pinctrl driver/pinctrl core driver

This also applies for Patch 1/2.

> Change PINCTRL_IMX to tristate to support loadable module build.
> 
> And 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 different
> architectures without CONFIG_OF.
> 
> Also add module author, description and license.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---
>  drivers/pinctrl/freescale/Kconfig       | 3 ++-
>  drivers/pinctrl/freescale/pinctrl-imx.c | 5 +++++
>  2 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pinctrl/freescale/Kconfig b/drivers/pinctrl/freescale/Kconfig
> index 570355c..922ae4b 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"

IMX pinctrl core 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 b80c450..3eaafb6 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>
> @@ -898,3 +899,7 @@ const struct dev_pm_ops imx_pinctrl_pm_ops = {
>  					imx_pinctrl_resume)
>  };
>  EXPORT_SYMBOL_GPL(imx_pinctrl_pm_ops);
> +
> +MODULE_AUTHOR("Linus Walleij <linus.walleij@linaro.org>");

MODULE_AUTHOR("Dong Aisheng <aisheng.dong@nxp.com>");

Regards
Aisheng

> +MODULE_DESCRIPTION("NXP i.MX common pinctrl driver");
> +MODULE_LICENSE("GPL v2");
> --
> 2.7.4
Anson Huang Sept. 7, 2020, 8:35 a.m. UTC | #2
> Subject: RE: [PATCH 2/2] pinctrl: imx: Support building i.MX pinctrl driver as
> module
> 
> > From: Anson Huang <Anson.Huang@nxp.com>
> > Sent: Thursday, July 16, 2020 11:07 PM
> > Subject: [PATCH 2/2] pinctrl: imx: Support building i.MX pinctrl
> > driver as module
> >
> 
> S/pinctrl driver/pinctrl core driver
> 
> This also applies for Patch 1/2.

OK

> 
> > Change PINCTRL_IMX to tristate to support loadable module build.
> >
> > And 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
> > different architectures without CONFIG_OF.
> >
> > Also add module author, description and license.
> >
> > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> > ---
> >  drivers/pinctrl/freescale/Kconfig       | 3 ++-
> >  drivers/pinctrl/freescale/pinctrl-imx.c | 5 +++++
> >  2 files changed, 7 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/pinctrl/freescale/Kconfig
> > b/drivers/pinctrl/freescale/Kconfig
> > index 570355c..922ae4b 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"
> 
> IMX pinctrl core driver

OK

> 
> > +	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 b80c450..3eaafb6 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>
> > @@ -898,3 +899,7 @@ const struct dev_pm_ops imx_pinctrl_pm_ops = {
> >  					imx_pinctrl_resume)
> >  };
> >  EXPORT_SYMBOL_GPL(imx_pinctrl_pm_ops);
> > +
> > +MODULE_AUTHOR("Linus Walleij <linus.walleij@linaro.org>");
> 
> MODULE_AUTHOR("Dong Aisheng <aisheng.dong@nxp.com>");
> 

OK.

Anson
diff mbox series

Patch

diff --git a/drivers/pinctrl/freescale/Kconfig b/drivers/pinctrl/freescale/Kconfig
index 570355c..922ae4b 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 b80c450..3eaafb6 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>
@@ -898,3 +899,7 @@  const struct dev_pm_ops imx_pinctrl_pm_ops = {
 					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");