2020-09-07 03:02:40

by Jianqun Xu

[permalink] [raw]
Subject: [PATCH 2/5] pinctrl: rockchip: make driver be tristate module

Make pinctrl-rockchip driver to be tristate module, support to build as
a module, this is useful for GKI.

Signed-off-by: Jianqun Xu <[email protected]>
---
drivers/pinctrl/Kconfig | 2 +-
drivers/pinctrl/pinctrl-rockchip.c | 18 ++++++++++++++++++
2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
index 4284f39a5c61..743eb2bb8709 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"
depends on OF
select PINMUX
select GENERIC_PINCONF
diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c
index 0401c1da79dd..cc7512acfc5f 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>
@@ -4257,4 +4259,20 @@ static int __init rockchip_pinctrl_drv_register(void)
{
return platform_driver_register(&rockchip_pinctrl_driver);
}
+
+static void __exit rockchip_pinctrl_drv_unregister(void)
+{
+ platform_driver_unregister(&rockchip_pinctrl_driver);
+}
+
+#ifdef CONFIG_PINCTRL_ROCKCHIP_MODULE
+module_init(rockchip_pinctrl_drv_register);
+#else
postcore_initcall(rockchip_pinctrl_drv_register);
+#endif
+module_exit(rockchip_pinctrl_drv_unregister);
+
+MODULE_DESCRIPTION("ROCKCHIP Pin Controller Driver");
+MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:pinctrl-rockchip");
+MODULE_DEVICE_TABLE(of, rockchip_pinctrl_dt_match);
--
2.17.1




2020-09-07 11:38:26

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH 2/5] pinctrl: rockchip: make driver be tristate module

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-rc4 next-20200903]
[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/20200907-114025
base: https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git for-next
config: riscv-allmodconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>

All errors (new ones prefixed by >>, old ones prefixed by <<):

>> ERROR: modpost: "irq_gc_set_wake" [drivers/pinctrl/pinctrl-rockchip.ko] undefined!

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]


Attachments:
(No filename) (1.33 kB)
.config.gz (64.38 kB)
Download all attachments

2020-09-12 11:42:34

by Heiko Stübner

[permalink] [raw]
Subject: Re: [PATCH 2/5] pinctrl: rockchip: make driver be tristate module

Hi,

Am Montag, 7. September 2020, 04:59:24 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 <[email protected]>
> ---
> drivers/pinctrl/Kconfig | 2 +-
> drivers/pinctrl/pinctrl-rockchip.c | 18 ++++++++++++++++++
> 2 files changed, 19 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
> index 4284f39a5c61..743eb2bb8709 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"
> depends on OF
> select PINMUX
> select GENERIC_PINCONF
> diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c
> index 0401c1da79dd..cc7512acfc5f 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>

of_device.h below of_address.h please


> #include <linux/of_address.h>
> #include <linux/of_irq.h>
> #include <linux/pinctrl/machine.h>
> @@ -4257,4 +4259,20 @@ static int __init rockchip_pinctrl_drv_register(void)
> {
> return platform_driver_register(&rockchip_pinctrl_driver);
> }
> +
> +static void __exit rockchip_pinctrl_drv_unregister(void)
> +{
> + platform_driver_unregister(&rockchip_pinctrl_driver);
> +}
> +
> +#ifdef CONFIG_PINCTRL_ROCKCHIP_MODULE
> +module_init(rockchip_pinctrl_drv_register);
> +#else
> postcore_initcall(rockchip_pinctrl_drv_register);
> +#endif

You definitly don't need this hack. For modules postcore_initcall
already points to module_init ... see

https://elixir.bootlin.com/linux/latest/source/include/linux/module.h#L114


Heiko


2020-09-14 00:39:50

by Jianqun Xu

[permalink] [raw]
Subject: [PATCH 2/2] pinctrl: rockchip: make driver be tristate module

Make pinctrl-rockchip driver to be tristate module, support to build as
a module, this is useful for GKI.

Signed-off-by: Jianqun Xu <[email protected]>
---
drivers/pinctrl/Kconfig | 2 +-
drivers/pinctrl/pinctrl-rockchip.c | 13 +++++++++++++
2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
index 4284f39a5c61..743eb2bb8709 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"
depends on OF
select PINMUX
select GENERIC_PINCONF
diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c
index 0401c1da79dd..927d132d6716 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>
@@ -4258,3 +4260,14 @@ static int __init rockchip_pinctrl_drv_register(void)
return platform_driver_register(&rockchip_pinctrl_driver);
}
postcore_initcall(rockchip_pinctrl_drv_register);
+
+static void __exit rockchip_pinctrl_drv_unregister(void)
+{
+ platform_driver_unregister(&rockchip_pinctrl_driver);
+}
+module_exit(rockchip_pinctrl_drv_unregister);
+
+MODULE_DESCRIPTION("ROCKCHIP Pin Controller Driver");
+MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:pinctrl-rockchip");
+MODULE_DEVICE_TABLE(of, rockchip_pinctrl_dt_match);
--
2.17.1



2020-09-20 22:41:38

by Heiko Stübner

[permalink] [raw]
Subject: Re: [PATCH 2/2] pinctrl: rockchip: make driver be tristate module

Am Montag, 14. September 2020, 02:38:47 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 <[email protected]>

Reviewed-by: Heiko Stuebner <[email protected]>

> ---
> drivers/pinctrl/Kconfig | 2 +-
> drivers/pinctrl/pinctrl-rockchip.c | 13 +++++++++++++
> 2 files changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
> index 4284f39a5c61..743eb2bb8709 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"
> depends on OF
> select PINMUX
> select GENERIC_PINCONF
> diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c
> index 0401c1da79dd..927d132d6716 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>
> @@ -4258,3 +4260,14 @@ static int __init rockchip_pinctrl_drv_register(void)
> return platform_driver_register(&rockchip_pinctrl_driver);
> }
> postcore_initcall(rockchip_pinctrl_drv_register);
> +
> +static void __exit rockchip_pinctrl_drv_unregister(void)
> +{
> + platform_driver_unregister(&rockchip_pinctrl_driver);
> +}
> +module_exit(rockchip_pinctrl_drv_unregister);
> +
> +MODULE_DESCRIPTION("ROCKCHIP Pin Controller Driver");
> +MODULE_LICENSE("GPL");
> +MODULE_ALIAS("platform:pinctrl-rockchip");
> +MODULE_DEVICE_TABLE(of, rockchip_pinctrl_dt_match);
>




2020-09-20 22:41:41

by Heiko Stübner

[permalink] [raw]
Subject: Re: [PATCH 2/2] pinctrl: rockchip: make driver be tristate module

Hi Jay,

Am Montag, 21. September 2020, 00:14:11 CEST schrieb Heiko St?bner:
> Am Montag, 14. September 2020, 02:38:47 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 <[email protected]>
>
> Reviewed-by: Heiko Stuebner <[email protected]>

It seems I've reviewed all patches of this series now, but I think
you might want to resend the series a final time as v3 in a cleaned up
state (drop patch1 and just post patches 2-5 in a full series) so that
we don't confuse Linus too much with the reposted patches we currently
have.

Thanks
Heiko




>
> > ---
> > drivers/pinctrl/Kconfig | 2 +-
> > drivers/pinctrl/pinctrl-rockchip.c | 13 +++++++++++++
> > 2 files changed, 14 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
> > index 4284f39a5c61..743eb2bb8709 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"
> > depends on OF
> > select PINMUX
> > select GENERIC_PINCONF
> > diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c
> > index 0401c1da79dd..927d132d6716 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>
> > @@ -4258,3 +4260,14 @@ static int __init rockchip_pinctrl_drv_register(void)
> > return platform_driver_register(&rockchip_pinctrl_driver);
> > }
> > postcore_initcall(rockchip_pinctrl_drv_register);
> > +
> > +static void __exit rockchip_pinctrl_drv_unregister(void)
> > +{
> > + platform_driver_unregister(&rockchip_pinctrl_driver);
> > +}
> > +module_exit(rockchip_pinctrl_drv_unregister);
> > +
> > +MODULE_DESCRIPTION("ROCKCHIP Pin Controller Driver");
> > +MODULE_LICENSE("GPL");
> > +MODULE_ALIAS("platform:pinctrl-rockchip");
> > +MODULE_DEVICE_TABLE(of, rockchip_pinctrl_dt_match);
> >
>
>




2020-09-29 13:22:43

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 2/2] pinctrl: rockchip: make driver be tristate module

On Mon, Sep 21, 2020 at 12:18 AM Heiko Stübner <[email protected]> wrote:

> It seems I've reviewed all patches of this series now, but I think
> you might want to resend the series a final time as v3 in a cleaned up
> state (drop patch1 and just post patches 2-5 in a full series) so that
> we don't confuse Linus too much with the reposted patches we currently
> have.

Yes please send a v3 like that so I can apply it!

Yours,
Linus Walleij

2020-10-13 11:57:40

by Jianqun Xu

[permalink] [raw]
Subject: Re: Re: [PATCH 2/2] pinctrl: rockchip: make driver be tristate module

Dear Walleij and Heiko

The patch "[PATCH] pinctrl: rockchip: populate platform device for rockchip gpio" has been remove outof
the patches, since we have a new patch to move gpio related codes to a separated driver.

So please ignore it for now. thanks very much.

--------------
[email protected]
>On Mon, Sep 21, 2020 at 12:18 AM Heiko Stübner <[email protected]> wrote:
>
>> It seems I've reviewed all patches of this series now, but I think
>> you might want to resend the series a final time as v3 in a cleaned up
>> state (drop patch1 and just post patches 2-5 in a full series) so that
>> we don't confuse Linus too much with the reposted patches we currently
>> have.
>
>Yes please send a v3 like that so I can apply it!
>
>Yours,
>Linus Walleij
>
>
>