diff mbox series

[1/6] pinctrl: rockchip: make driver be tristate module

Message ID 20200831084753.7115-2-jay.xu@rock-chips.com (mailing list archive)
State New, archived
Headers show
Series rockchip-pinctrl fixes for GKI | expand

Commit Message

Jianqun Xu Aug. 31, 2020, 8:47 a.m. UTC
Make pinctrl-rockchip driver to be tristate module, support to build as
a module, this is useful for GKI.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
---
 drivers/pinctrl/Kconfig            | 2 +-
 drivers/pinctrl/pinctrl-rockchip.c | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

Comments

kernel test robot Sept. 1, 2020, 10:13 a.m. UTC | #1
Hi Jianqun,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on rockchip/for-next]
[also build test ERROR on pinctrl/devel v5.9-rc3 next-20200828]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Jianqun-Xu/rockchip-pinctrl-fixes-for-GKI/20200831-165040
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git for-next
config: x86_64-randconfig-m031-20200901 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/pinctrl/pinctrl-rockchip.c: In function 'rockchip_pinctrl_parse_groups':
>> drivers/pinctrl/pinctrl-rockchip.c:2881:9: error: implicit declaration of function 'pinconf_generic_parse_dt_config'; did you mean 'pinconf_generic_dump_config'? [-Werror=implicit-function-declaration]
    2881 |   ret = pinconf_generic_parse_dt_config(np_config, NULL,
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |         pinconf_generic_dump_config
   drivers/pinctrl/pinctrl-rockchip.c: In function 'rockchip_gpiolib_register':
>> drivers/pinctrl/pinctrl-rockchip.c:3473:5: error: 'struct gpio_chip' has no member named 'of_node'
    3473 |   gc->of_node = bank->of_node;
         |     ^~
   At top level:
   drivers/pinctrl/pinctrl-rockchip.c:2804:34: warning: 'rockchip_bank_match' defined but not used [-Wunused-const-variable=]
    2804 | static const struct of_device_id rockchip_bank_match[] = {
         |                                  ^~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

# https://github.com/0day-ci/linux/commit/38fa905767d010bbbc1035b48494d4a83bb72410
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jianqun-Xu/rockchip-pinctrl-fixes-for-GKI/20200831-165040
git checkout 38fa905767d010bbbc1035b48494d4a83bb72410
vim +2881 drivers/pinctrl/pinctrl-rockchip.c

d3e5116119bd02 Heiko Stübner   2013-06-10  2823  
d3e5116119bd02 Heiko Stübner   2013-06-10  2824  static int rockchip_pinctrl_parse_groups(struct device_node *np,
d3e5116119bd02 Heiko Stübner   2013-06-10  2825  					      struct rockchip_pin_group *grp,
d3e5116119bd02 Heiko Stübner   2013-06-10  2826  					      struct rockchip_pinctrl *info,
d3e5116119bd02 Heiko Stübner   2013-06-10  2827  					      u32 index)
d3e5116119bd02 Heiko Stübner   2013-06-10  2828  {
d3e5116119bd02 Heiko Stübner   2013-06-10  2829  	struct rockchip_pin_bank *bank;
d3e5116119bd02 Heiko Stübner   2013-06-10  2830  	int size;
d3e5116119bd02 Heiko Stübner   2013-06-10  2831  	const __be32 *list;
d3e5116119bd02 Heiko Stübner   2013-06-10  2832  	int num;
d3e5116119bd02 Heiko Stübner   2013-06-10  2833  	int i, j;
d3e5116119bd02 Heiko Stübner   2013-06-10  2834  	int ret;
d3e5116119bd02 Heiko Stübner   2013-06-10  2835  
94f4e54cecaf3e Rob Herring     2018-08-27  2836  	dev_dbg(info->dev, "group(%d): %pOFn\n", index, np);
d3e5116119bd02 Heiko Stübner   2013-06-10  2837  
d3e5116119bd02 Heiko Stübner   2013-06-10  2838  	/* Initialise group */
d3e5116119bd02 Heiko Stübner   2013-06-10  2839  	grp->name = np->name;
d3e5116119bd02 Heiko Stübner   2013-06-10  2840  
d3e5116119bd02 Heiko Stübner   2013-06-10  2841  	/*
d3e5116119bd02 Heiko Stübner   2013-06-10  2842  	 * the binding format is rockchip,pins = <bank pin mux CONFIG>,
d3e5116119bd02 Heiko Stübner   2013-06-10  2843  	 * do sanity check and calculate pins number
d3e5116119bd02 Heiko Stübner   2013-06-10  2844  	 */
d3e5116119bd02 Heiko Stübner   2013-06-10  2845  	list = of_get_property(np, "rockchip,pins", &size);
d3e5116119bd02 Heiko Stübner   2013-06-10  2846  	/* we do not check return since it's safe node passed down */
d3e5116119bd02 Heiko Stübner   2013-06-10  2847  	size /= sizeof(*list);
d3e5116119bd02 Heiko Stübner   2013-06-10  2848  	if (!size || size % 4) {
d3e5116119bd02 Heiko Stübner   2013-06-10  2849  		dev_err(info->dev, "wrong pins number or pins and configs should be by 4\n");
d3e5116119bd02 Heiko Stübner   2013-06-10  2850  		return -EINVAL;
d3e5116119bd02 Heiko Stübner   2013-06-10  2851  	}
d3e5116119bd02 Heiko Stübner   2013-06-10  2852  
d3e5116119bd02 Heiko Stübner   2013-06-10  2853  	grp->npins = size / 4;
d3e5116119bd02 Heiko Stübner   2013-06-10  2854  
a86854d0c599b3 Kees Cook       2018-06-12  2855  	grp->pins = devm_kcalloc(info->dev, grp->npins, sizeof(unsigned int),
d3e5116119bd02 Heiko Stübner   2013-06-10  2856  						GFP_KERNEL);
a86854d0c599b3 Kees Cook       2018-06-12  2857  	grp->data = devm_kcalloc(info->dev,
a86854d0c599b3 Kees Cook       2018-06-12  2858  					grp->npins,
d3e5116119bd02 Heiko Stübner   2013-06-10  2859  					sizeof(struct rockchip_pin_config),
d3e5116119bd02 Heiko Stübner   2013-06-10  2860  					GFP_KERNEL);
d3e5116119bd02 Heiko Stübner   2013-06-10  2861  	if (!grp->pins || !grp->data)
d3e5116119bd02 Heiko Stübner   2013-06-10  2862  		return -ENOMEM;
d3e5116119bd02 Heiko Stübner   2013-06-10  2863  
d3e5116119bd02 Heiko Stübner   2013-06-10  2864  	for (i = 0, j = 0; i < size; i += 4, j++) {
d3e5116119bd02 Heiko Stübner   2013-06-10  2865  		const __be32 *phandle;
d3e5116119bd02 Heiko Stübner   2013-06-10  2866  		struct device_node *np_config;
d3e5116119bd02 Heiko Stübner   2013-06-10  2867  
d3e5116119bd02 Heiko Stübner   2013-06-10  2868  		num = be32_to_cpu(*list++);
d3e5116119bd02 Heiko Stübner   2013-06-10  2869  		bank = bank_num_to_bank(info, num);
d3e5116119bd02 Heiko Stübner   2013-06-10  2870  		if (IS_ERR(bank))
d3e5116119bd02 Heiko Stübner   2013-06-10  2871  			return PTR_ERR(bank);
d3e5116119bd02 Heiko Stübner   2013-06-10  2872  
d3e5116119bd02 Heiko Stübner   2013-06-10  2873  		grp->pins[j] = bank->pin_base + be32_to_cpu(*list++);
d3e5116119bd02 Heiko Stübner   2013-06-10  2874  		grp->data[j].func = be32_to_cpu(*list++);
d3e5116119bd02 Heiko Stübner   2013-06-10  2875  
d3e5116119bd02 Heiko Stübner   2013-06-10  2876  		phandle = list++;
d3e5116119bd02 Heiko Stübner   2013-06-10  2877  		if (!phandle)
d3e5116119bd02 Heiko Stübner   2013-06-10  2878  			return -EINVAL;
d3e5116119bd02 Heiko Stübner   2013-06-10  2879  
d3e5116119bd02 Heiko Stübner   2013-06-10  2880  		np_config = of_find_node_by_phandle(be32_to_cpup(phandle));
dd4d01f7bad886 Soren Brinkmann 2015-01-09 @2881  		ret = pinconf_generic_parse_dt_config(np_config, NULL,
d3e5116119bd02 Heiko Stübner   2013-06-10  2882  				&grp->data[j].configs, &grp->data[j].nconfigs);
d3e5116119bd02 Heiko Stübner   2013-06-10  2883  		if (ret)
d3e5116119bd02 Heiko Stübner   2013-06-10  2884  			return ret;
d3e5116119bd02 Heiko Stübner   2013-06-10  2885  	}
d3e5116119bd02 Heiko Stübner   2013-06-10  2886  
d3e5116119bd02 Heiko Stübner   2013-06-10  2887  	return 0;
d3e5116119bd02 Heiko Stübner   2013-06-10  2888  }
d3e5116119bd02 Heiko Stübner   2013-06-10  2889  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Heiko Stuebner Sept. 5, 2020, 9:51 p.m. UTC | #2
Hi,

Am Dienstag, 1. September 2020, 12:13:16 CEST schrieb kernel test robot:
> Hi Jianqun,
> 
> Thank you for the patch! Yet something to improve:
> 
> [auto build test ERROR on rockchip/for-next]
> [also build test ERROR on pinctrl/devel v5.9-rc3 next-20200828]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch]
> 
> url:    https://github.com/0day-ci/linux/commits/Jianqun-Xu/rockchip-pinctrl-fixes-for-GKI/20200831-165040
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git for-next
> config: x86_64-randconfig-m031-20200901 (attached as .config)
> compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
> reproduce (this is a W=1 build):
>         # save the attached .config to linux build tree
>         make W=1 ARCH=x86_64 
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All errors (new ones prefixed by >>):
> 
>    drivers/pinctrl/pinctrl-rockchip.c: In function 'rockchip_pinctrl_parse_groups':
> >> drivers/pinctrl/pinctrl-rockchip.c:2881:9: error: implicit declaration of function 'pinconf_generic_parse_dt_config'; did you mean 'pinconf_generic_dump_config'? [-Werror=implicit-function-declaration]
>     2881 |   ret = pinconf_generic_parse_dt_config(np_config, NULL,
>          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>          |         pinconf_generic_dump_config
>    drivers/pinctrl/pinctrl-rockchip.c: In function 'rockchip_gpiolib_register':
> >> drivers/pinctrl/pinctrl-rockchip.c:3473:5: error: 'struct gpio_chip' has no member named 'of_node'
>     3473 |   gc->of_node = bank->of_node;
>          |     ^~
>    At top level:
>    drivers/pinctrl/pinctrl-rockchip.c:2804:34: warning: 'rockchip_bank_match' defined but not used [-Wunused-const-variable=]
>     2804 | static const struct of_device_id rockchip_bank_match[] = {
>          |                                  ^~~~~~~~~~~~~~~~~~~
>    cc1: some warnings being treated as errors

these errors are unrelated to this patch, and I addressed them in
[PATCH] pinctrl: rockchip: depend on OF [0]

Heiko

[0] http://lore.kernel.org/r/20200905214955.907950-1-heiko@sntech.de


> 
> # https://github.com/0day-ci/linux/commit/38fa905767d010bbbc1035b48494d4a83bb72410
> git remote add linux-review https://github.com/0day-ci/linux
> git fetch --no-tags linux-review Jianqun-Xu/rockchip-pinctrl-fixes-for-GKI/20200831-165040
> git checkout 38fa905767d010bbbc1035b48494d4a83bb72410
> vim +2881 drivers/pinctrl/pinctrl-rockchip.c
> 
> d3e5116119bd02 Heiko Stübner   2013-06-10  2823  
> d3e5116119bd02 Heiko Stübner   2013-06-10  2824  static int rockchip_pinctrl_parse_groups(struct device_node *np,
> d3e5116119bd02 Heiko Stübner   2013-06-10  2825  					      struct rockchip_pin_group *grp,
> d3e5116119bd02 Heiko Stübner   2013-06-10  2826  					      struct rockchip_pinctrl *info,
> d3e5116119bd02 Heiko Stübner   2013-06-10  2827  					      u32 index)
> d3e5116119bd02 Heiko Stübner   2013-06-10  2828  {
> d3e5116119bd02 Heiko Stübner   2013-06-10  2829  	struct rockchip_pin_bank *bank;
> d3e5116119bd02 Heiko Stübner   2013-06-10  2830  	int size;
> d3e5116119bd02 Heiko Stübner   2013-06-10  2831  	const __be32 *list;
> d3e5116119bd02 Heiko Stübner   2013-06-10  2832  	int num;
> d3e5116119bd02 Heiko Stübner   2013-06-10  2833  	int i, j;
> d3e5116119bd02 Heiko Stübner   2013-06-10  2834  	int ret;
> d3e5116119bd02 Heiko Stübner   2013-06-10  2835  
> 94f4e54cecaf3e Rob Herring     2018-08-27  2836  	dev_dbg(info->dev, "group(%d): %pOFn\n", index, np);
> d3e5116119bd02 Heiko Stübner   2013-06-10  2837  
> d3e5116119bd02 Heiko Stübner   2013-06-10  2838  	/* Initialise group */
> d3e5116119bd02 Heiko Stübner   2013-06-10  2839  	grp->name = np->name;
> d3e5116119bd02 Heiko Stübner   2013-06-10  2840  
> d3e5116119bd02 Heiko Stübner   2013-06-10  2841  	/*
> d3e5116119bd02 Heiko Stübner   2013-06-10  2842  	 * the binding format is rockchip,pins = <bank pin mux CONFIG>,
> d3e5116119bd02 Heiko Stübner   2013-06-10  2843  	 * do sanity check and calculate pins number
> d3e5116119bd02 Heiko Stübner   2013-06-10  2844  	 */
> d3e5116119bd02 Heiko Stübner   2013-06-10  2845  	list = of_get_property(np, "rockchip,pins", &size);
> d3e5116119bd02 Heiko Stübner   2013-06-10  2846  	/* we do not check return since it's safe node passed down */
> d3e5116119bd02 Heiko Stübner   2013-06-10  2847  	size /= sizeof(*list);
> d3e5116119bd02 Heiko Stübner   2013-06-10  2848  	if (!size || size % 4) {
> d3e5116119bd02 Heiko Stübner   2013-06-10  2849  		dev_err(info->dev, "wrong pins number or pins and configs should be by 4\n");
> d3e5116119bd02 Heiko Stübner   2013-06-10  2850  		return -EINVAL;
> d3e5116119bd02 Heiko Stübner   2013-06-10  2851  	}
> d3e5116119bd02 Heiko Stübner   2013-06-10  2852  
> d3e5116119bd02 Heiko Stübner   2013-06-10  2853  	grp->npins = size / 4;
> d3e5116119bd02 Heiko Stübner   2013-06-10  2854  
> a86854d0c599b3 Kees Cook       2018-06-12  2855  	grp->pins = devm_kcalloc(info->dev, grp->npins, sizeof(unsigned int),
> d3e5116119bd02 Heiko Stübner   2013-06-10  2856  						GFP_KERNEL);
> a86854d0c599b3 Kees Cook       2018-06-12  2857  	grp->data = devm_kcalloc(info->dev,
> a86854d0c599b3 Kees Cook       2018-06-12  2858  					grp->npins,
> d3e5116119bd02 Heiko Stübner   2013-06-10  2859  					sizeof(struct rockchip_pin_config),
> d3e5116119bd02 Heiko Stübner   2013-06-10  2860  					GFP_KERNEL);
> d3e5116119bd02 Heiko Stübner   2013-06-10  2861  	if (!grp->pins || !grp->data)
> d3e5116119bd02 Heiko Stübner   2013-06-10  2862  		return -ENOMEM;
> d3e5116119bd02 Heiko Stübner   2013-06-10  2863  
> d3e5116119bd02 Heiko Stübner   2013-06-10  2864  	for (i = 0, j = 0; i < size; i += 4, j++) {
> d3e5116119bd02 Heiko Stübner   2013-06-10  2865  		const __be32 *phandle;
> d3e5116119bd02 Heiko Stübner   2013-06-10  2866  		struct device_node *np_config;
> d3e5116119bd02 Heiko Stübner   2013-06-10  2867  
> d3e5116119bd02 Heiko Stübner   2013-06-10  2868  		num = be32_to_cpu(*list++);
> d3e5116119bd02 Heiko Stübner   2013-06-10  2869  		bank = bank_num_to_bank(info, num);
> d3e5116119bd02 Heiko Stübner   2013-06-10  2870  		if (IS_ERR(bank))
> d3e5116119bd02 Heiko Stübner   2013-06-10  2871  			return PTR_ERR(bank);
> d3e5116119bd02 Heiko Stübner   2013-06-10  2872  
> d3e5116119bd02 Heiko Stübner   2013-06-10  2873  		grp->pins[j] = bank->pin_base + be32_to_cpu(*list++);
> d3e5116119bd02 Heiko Stübner   2013-06-10  2874  		grp->data[j].func = be32_to_cpu(*list++);
> d3e5116119bd02 Heiko Stübner   2013-06-10  2875  
> d3e5116119bd02 Heiko Stübner   2013-06-10  2876  		phandle = list++;
> d3e5116119bd02 Heiko Stübner   2013-06-10  2877  		if (!phandle)
> d3e5116119bd02 Heiko Stübner   2013-06-10  2878  			return -EINVAL;
> d3e5116119bd02 Heiko Stübner   2013-06-10  2879  
> d3e5116119bd02 Heiko Stübner   2013-06-10  2880  		np_config = of_find_node_by_phandle(be32_to_cpup(phandle));
> dd4d01f7bad886 Soren Brinkmann 2015-01-09 @2881  		ret = pinconf_generic_parse_dt_config(np_config, NULL,
> d3e5116119bd02 Heiko Stübner   2013-06-10  2882  				&grp->data[j].configs, &grp->data[j].nconfigs);
> d3e5116119bd02 Heiko Stübner   2013-06-10  2883  		if (ret)
> d3e5116119bd02 Heiko Stübner   2013-06-10  2884  			return ret;
> d3e5116119bd02 Heiko Stübner   2013-06-10  2885  	}
> d3e5116119bd02 Heiko Stübner   2013-06-10  2886  
> d3e5116119bd02 Heiko Stübner   2013-06-10  2887  	return 0;
> d3e5116119bd02 Heiko Stübner   2013-06-10  2888  }
> d3e5116119bd02 Heiko Stübner   2013-06-10  2889  
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
>
Heiko Stuebner Sept. 5, 2020, 10:01 p.m. UTC | #3
Am Montag, 31. August 2020, 10:47:48 CEST schrieb Jianqun Xu:
> Make pinctrl-rockchip driver to be tristate module, support to build as
> a module, this is useful for GKI.
> 
> Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>

Reviewed-by: Heiko Stuebner <heiko@sntech.de>

> ---
>  drivers/pinctrl/Kconfig            | 2 +-
>  drivers/pinctrl/pinctrl-rockchip.c | 7 +++++++
>  2 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
> index 8828613c4e0e..dd4874e2ac67 100644
> --- a/drivers/pinctrl/Kconfig
> +++ b/drivers/pinctrl/Kconfig
> @@ -207,7 +207,7 @@ config PINCTRL_OXNAS
>  	select MFD_SYSCON
>  
>  config PINCTRL_ROCKCHIP
> -	bool
> +	tristate "Rockchip gpio and pinctrl driver"
>  	select PINMUX
>  	select GENERIC_PINCONF
>  	select GENERIC_IRQ_CHIP
> diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c
> index c07324d1f265..24dfc814dee1 100644
> --- a/drivers/pinctrl/pinctrl-rockchip.c
> +++ b/drivers/pinctrl/pinctrl-rockchip.c
> @@ -16,10 +16,12 @@
>   */
>  
>  #include <linux/init.h>
> +#include <linux/module.h>
>  #include <linux/platform_device.h>
>  #include <linux/io.h>
>  #include <linux/bitops.h>
>  #include <linux/gpio/driver.h>
> +#include <linux/of_device.h>
>  #include <linux/of_address.h>
>  #include <linux/of_irq.h>
>  #include <linux/pinctrl/machine.h>
> @@ -4256,3 +4258,8 @@ static int __init rockchip_pinctrl_drv_register(void)
>  	return platform_driver_register(&rockchip_pinctrl_driver);
>  }
>  postcore_initcall(rockchip_pinctrl_drv_register);
> +
> +MODULE_DESCRIPTION("ROCKCHIP Pin Controller Driver");
> +MODULE_LICENSE("GPL");
> +MODULE_ALIAS("platform:pinctrl-rockchip");
> +MODULE_DEVICE_TABLE(of, rockchip_pinctrl_dt_match);
>
Heiko Stuebner Sept. 5, 2020, 10:23 p.m. UTC | #4
Am Sonntag, 6. September 2020, 00:01:55 CEST schrieb Heiko Stübner:
> Am Montag, 31. August 2020, 10:47:48 CEST schrieb Jianqun Xu:
> > Make pinctrl-rockchip driver to be tristate module, support to build as
> > a module, this is useful for GKI.
> > 
> > Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
> 
> Reviewed-by: Heiko Stuebner <heiko@sntech.de>

I take this back.


What happens when you actually unload the module now?
I checked and all the pinctrl stuff itself is using devm-functions
so should be safe, but you're missing the 

platform_driver_unregister part that should happen as well.


Heiko

> > ---
> >  drivers/pinctrl/Kconfig            | 2 +-
> >  drivers/pinctrl/pinctrl-rockchip.c | 7 +++++++
> >  2 files changed, 8 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
> > index 8828613c4e0e..dd4874e2ac67 100644
> > --- a/drivers/pinctrl/Kconfig
> > +++ b/drivers/pinctrl/Kconfig
> > @@ -207,7 +207,7 @@ config PINCTRL_OXNAS
> >  	select MFD_SYSCON
> >  
> >  config PINCTRL_ROCKCHIP
> > -	bool
> > +	tristate "Rockchip gpio and pinctrl driver"
> >  	select PINMUX
> >  	select GENERIC_PINCONF
> >  	select GENERIC_IRQ_CHIP
> > diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c
> > index c07324d1f265..24dfc814dee1 100644
> > --- a/drivers/pinctrl/pinctrl-rockchip.c
> > +++ b/drivers/pinctrl/pinctrl-rockchip.c
> > @@ -16,10 +16,12 @@
> >   */
> >  
> >  #include <linux/init.h>
> > +#include <linux/module.h>
> >  #include <linux/platform_device.h>
> >  #include <linux/io.h>
> >  #include <linux/bitops.h>
> >  #include <linux/gpio/driver.h>
> > +#include <linux/of_device.h>
> >  #include <linux/of_address.h>
> >  #include <linux/of_irq.h>
> >  #include <linux/pinctrl/machine.h>
> > @@ -4256,3 +4258,8 @@ static int __init rockchip_pinctrl_drv_register(void)
> >  	return platform_driver_register(&rockchip_pinctrl_driver);
> >  }
> >  postcore_initcall(rockchip_pinctrl_drv_register);
> > +
> > +MODULE_DESCRIPTION("ROCKCHIP Pin Controller Driver");
> > +MODULE_LICENSE("GPL");
> > +MODULE_ALIAS("platform:pinctrl-rockchip");
> > +MODULE_DEVICE_TABLE(of, rockchip_pinctrl_dt_match);
> > 
> 
>
diff mbox series

Patch

diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
index 8828613c4e0e..dd4874e2ac67 100644
--- a/drivers/pinctrl/Kconfig
+++ b/drivers/pinctrl/Kconfig
@@ -207,7 +207,7 @@  config PINCTRL_OXNAS
 	select MFD_SYSCON
 
 config PINCTRL_ROCKCHIP
-	bool
+	tristate "Rockchip gpio and pinctrl driver"
 	select PINMUX
 	select GENERIC_PINCONF
 	select GENERIC_IRQ_CHIP
diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c
index c07324d1f265..24dfc814dee1 100644
--- a/drivers/pinctrl/pinctrl-rockchip.c
+++ b/drivers/pinctrl/pinctrl-rockchip.c
@@ -16,10 +16,12 @@ 
  */
 
 #include <linux/init.h>
+#include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
 #include <linux/bitops.h>
 #include <linux/gpio/driver.h>
+#include <linux/of_device.h>
 #include <linux/of_address.h>
 #include <linux/of_irq.h>
 #include <linux/pinctrl/machine.h>
@@ -4256,3 +4258,8 @@  static int __init rockchip_pinctrl_drv_register(void)
 	return platform_driver_register(&rockchip_pinctrl_driver);
 }
 postcore_initcall(rockchip_pinctrl_drv_register);
+
+MODULE_DESCRIPTION("ROCKCHIP Pin Controller Driver");
+MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:pinctrl-rockchip");
+MODULE_DEVICE_TABLE(of, rockchip_pinctrl_dt_match);