[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AM6PR04MB49662633660DBC477DD2432D80290@AM6PR04MB4966.eurprd04.prod.outlook.com>
Date: Tue, 8 Sep 2020 02:43:47 +0000
From: Aisheng Dong <aisheng.dong@....com>
To: Anson Huang <anson.huang@....com>,
"festevam@...il.com" <festevam@...il.com>,
"shawnguo@...nel.org" <shawnguo@...nel.org>,
"stefan@...er.ch" <stefan@...er.ch>,
"kernel@...gutronix.de" <kernel@...gutronix.de>,
"linus.walleij@...aro.org" <linus.walleij@...aro.org>,
"s.hauer@...gutronix.de" <s.hauer@...gutronix.de>,
"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>
CC: dl-linux-imx <linux-imx@....com>
Subject: RE: [PATCH V2 2/3] pinctrl: imx: Support building SCU pinctrl core
driver as module
> From: Anson Huang <Anson.Huang@....com>
> Sent: Monday, September 7, 2020 8:33 PM
>
> Change PINCTR_IMX_SCU to tristate, remove unnecessary #ifdef and add
> module author, description and license to support building SCU pinctrl core
> driver as module.
>
> Signed-off-by: Anson Huang <Anson.Huang@....com>
> ---
> Changes since V1:
> - split V1 [1/2] patch to 2 patches, this patch supports building SCU pinctrl
> core
> driver as module;
> - remove unnecessary #ifdef check and #else block.
> ---
> drivers/pinctrl/freescale/Kconfig | 2 +-
> drivers/pinctrl/freescale/pinctrl-imx.h | 20 --------------------
> drivers/pinctrl/freescale/pinctrl-scu.c | 5 +++++
> 3 files changed, 6 insertions(+), 21 deletions(-)
>
> diff --git a/drivers/pinctrl/freescale/Kconfig b/drivers/pinctrl/freescale/Kconfig
> index 08fcf5c..452c499 100644
> --- a/drivers/pinctrl/freescale/Kconfig
> +++ b/drivers/pinctrl/freescale/Kconfig
> @@ -7,7 +7,7 @@ config PINCTRL_IMX
> select REGMAP
>
> config PINCTRL_IMX_SCU
> - bool
> + tristate "IMX SCU pinctrl core driver"
> depends on IMX_SCU
> select PINCTRL_IMX
>
[...]
> diff --git a/drivers/pinctrl/freescale/pinctrl-imx.h
> b/drivers/pinctrl/freescale/pinctrl-imx.h
> index 40927ca..fd8c4b6 100644
> --- a/drivers/pinctrl/freescale/pinctrl-imx.h
> +++ b/drivers/pinctrl/freescale/pinctrl-imx.h
> @@ -144,7 +144,6 @@ struct imx_pinctrl_soc_info { int
> imx_pinctrl_probe(struct platform_device *pdev,
> const struct imx_pinctrl_soc_info *info);
>
> -#ifdef CONFIG_PINCTRL_IMX_SCU
> #define BM_PAD_CTL_GP_ENABLE BIT(30)
> #define BM_PAD_CTL_IFMUX_ENABLE BIT(31)
> #define BP_PAD_CTL_IFMUX 27
> @@ -157,23 +156,4 @@ int imx_pinconf_set_scu(struct pinctrl_dev *pctldev,
> unsigned pin_id, void imx_pinctrl_parse_pin_scu(struct imx_pinctrl *ipctl,
> unsigned int *pin_id, struct imx_pin *pin,
> const __be32 **list_p);
> -#else
> -static inline int imx_pinconf_get_scu(struct pinctrl_dev *pctldev,
> - unsigned pin_id, unsigned long *config)
> -{
> - return -EINVAL;
> -}
> -static inline int imx_pinconf_set_scu(struct pinctrl_dev *pctldev,
> - unsigned pin_id, unsigned long *configs,
> - unsigned num_configs)
> -{
> - return -EINVAL;
> -}
> -static inline void imx_pinctrl_parse_pin_scu(struct imx_pinctrl *ipctl,
> - unsigned int *pin_id,
> - struct imx_pin *pin,
> - const __be32 **list_p)
> -{
> -}
> -#endif
> #endif /* __DRIVERS_PINCTRL_IMX_H */
Should this part of changes go to Patch 1?
> diff --git a/drivers/pinctrl/freescale/pinctrl-scu.c
> b/drivers/pinctrl/freescale/pinctrl-scu.c
> index 9df45d3..59b5f8a 100644
> --- a/drivers/pinctrl/freescale/pinctrl-scu.c
> +++ b/drivers/pinctrl/freescale/pinctrl-scu.c
> @@ -7,6 +7,7 @@
>
> #include <linux/err.h>
> #include <linux/firmware/imx/sci.h>
> +#include <linux/module.h>
> #include <linux/of_address.h>
> #include <linux/pinctrl/pinctrl.h>
> #include <linux/platform_device.h>
> @@ -123,3 +124,7 @@ void imx_pinctrl_parse_pin_scu(struct imx_pinctrl
> *ipctl,
> pin_scu->mux_mode, pin_scu->config);
> }
> EXPORT_SYMBOL_GPL(imx_pinctrl_parse_pin_scu);
> +
> +MODULE_AUTHOR("Dong Aisheng <aisheng.dong@....com>");
> +MODULE_DESCRIPTION("NXP i.MX SCU common pinctrl driver");
> +MODULE_LICENSE("GPL v2");
> --
> 2.7.4
Powered by blists - more mailing lists