ARM: shmobile: Disallow PINCTRL without GPIOLIB
Subsystems (2)
From: Magnus Damm <[email protected]>
Modify mach-shmobile to only select PINCTRL in case of ARCH_WANT_OPTIONAL_GPIOLIB is set.
This fixes a build error triggered when adding a new SoC lacking GPIO software support (ARCH_WANT_OPTIONAL_GPIOLIB=n):
CC drivers/tty/vt/keyboard.o
In file included from drivers/pinctrl/core.c:30:0:include/asm-generic/gpio.h: In function 'gpio_get_value_cansleep':include/asm-generic/gpio.h:270:2: error: implicit declaration of function '__gpio_get_value' include/asm-generic/gpio.h: In function 'gpio_set_value_cansleep':include/asm-generic/gpio.h:276:2: error: implicit declaration of function '__gpio_set_value' drivers/pinctrl/core.c: In function 'pinctrl_ready_for_gpio_range':drivers/pinctrl/core.c:297:9: error: implicit declaration of function 'gpio_to_chip' drivers/pinctrl/core.c:297:27: warning: initialization makes pointer from integer without a cast drivers/pinctrl/core.c:304:45: error: dereferencing pointer to incomplete type drivers/pinctrl/core.c:305:26: error: dereferencing pointer to incomplete type drivers/pinctrl/core.c:305:39: error: dereferencing pointer to incomplete type make[2]: *** [drivers/pinctrl/core.o] Error 1
make[1]: *** [drivers/pinctrl] Error 2
make[1]: *** Waiting for unfinished jobs....
LD drivers/sh/built-in.o
---
Using renesas.git "next" 811689afc214564c4a5f238ecf4d8bdc0e52b615
Trigger using the r8a73a4 patches that lack GPIO and PFC support.
I am more than happy to replace this patch with something cleaner.
arch/arm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/Kconfig +1 -1
@@ -725,7 +725,7 @@ config ARCH_SHMOBILE select MULTI_IRQ_HANDLER select NEED_MACH_MEMORY_H select NO_IOPORT - select PINCTRL + select PINCTRL if ARCH_WANT_OPTIONAL_GPIOLIB select PM_GENERIC_DOMAINS if PM select SPARSE_IRQ help
Quoted 25 lines · Magnus Damm
From: Magnus Damm <[email protected]>
Modify mach-shmobile to only select PINCTRL in case of
ARCH_WANT_OPTIONAL_GPIOLIBis set.This fixes a build error triggered when adding a new SoC lacking GPIO software support (ARCH_WANT_OPTIONAL_GPIOLIB=n):
CC
drivers/tty/vt/keyboard.o
In file included fromdrivers/pinctrl/core.c:30:0:include/asm-generic/gpio.h: In function 'gpio_get_value_cansleep':include/asm-generic/gpio.h:270:2: error: implicit declaration of function '__gpio_get_value'include/asm-generic/gpio.h: In function 'gpio_set_value_cansleep':include/asm-generic/gpio.h:276:2: error: implicit declaration of function '__gpio_set_value'drivers/pinctrl/core.c: In function 'pinctrl_ready_for_gpio_range':drivers/pinctrl/core.c:297:9: error: implicit declaration of function 'gpio_to_chip'drivers/pinctrl/core.c:297:27: warning: initialization makes pointer from integer without a castdrivers/pinctrl/core.c:304:45: error: dereferencing pointer to incomplete typedrivers/pinctrl/core.c:305:26: error: dereferencing pointer to incomplete typedrivers/pinctrl/core.c:305:39: error: dereferencing pointer to incomplete type make[2]: *** [drivers/pinctrl/core.o] Error 1
make[1]: *** [drivers/pinctrl] Error 2
make[1]: *** Waiting for unfinished jobs....
LDdrivers/sh/built-in.o
Quoted 1 line
Signed-off-by Magnus Damm <[email protected]>
Laurent, could you review this please?
Quoted 27 lines
---
Using renesas.git "next"
811689afc214564c4a5f238ecf4d8bdc0e52b615Trigger using the r8a73a4 patches that lack GPIO and PFC support.
I am more than happy to replace this patch with something cleaner.
arch/arm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/Kconfig +1
-2@@ -725,7 +725,7 @@ config ARCH_SHMOBILE select MULTI_IRQ_HANDLER select NEED_MACH_MEMORY_H select NO_IOPORT - select PINCTRL + select PINCTRL if ARCH_WANT_OPTIONAL_GPIOLIB select PM_GENERIC_DOMAINS if PM select SPARSE_IRQ help --To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Magnus,
Thanks for the patch.
Quoted 34 lines · On Monday 18 March 2013 22:58:18 Magnus Damm wrote:
From: Magnus Damm <[email protected]>
Modify mach-shmobile to only select PINCTRL in case of
ARCH_WANT_OPTIONAL_GPIOLIBis set.This fixes a build error triggered when adding a new SoC lacking GPIO software support (ARCH_WANT_OPTIONAL_GPIOLIB=n):
CC
drivers/tty/vt/keyboard.o
In file included fromdrivers/pinctrl/core.c:30:0:include/asm-generic/gpio.h: In function 'gpio_get_value_cansleep':include/asm-generic/gpio.h:270:2: error: implicit declaration of function '__gpio_get_value'include/asm-generic/gpio.h: In function 'gpio_set_value_cansleep':include/asm-generic/gpio.h:276:2: error: implicit declaration of function '__gpio_set_value'drivers/pinctrl/core.c: In function 'pinctrl_ready_for_gpio_range':drivers/pinctrl/core.c:297:9: error: implicit declaration of function 'gpio_to_chip'drivers/pinctrl/core.c:297:27: warning: initialization makes pointer from integer without a castdrivers/pinctrl/core.c:304:45: error: dereferencing pointer to incomplete typedrivers/pinctrl/core.c:305:26: error: dereferencing pointer to incomplete typedrivers/pinctrl/core.c:305:39: error: dereferencing pointer to incomplete type
make[2]: *** [drivers/pinctrl/core.o] Error 1
make[1]: *** [drivers/pinctrl] Error 2
make[1]: *** Waiting for unfinished jobs....
LDdrivers/sh/built-in.oSigned-off-by Magnus Damm <[email protected]>
Quoted 7 lines
---
Using renesas.git "next"
811689afc214564c4a5f238ecf4d8bdc0e52b615Trigger using the r8a73a4 patches that lack GPIO and PFC support.
I am more than happy to replace this patch with something cleaner.
If I'm not mistaken your patch fixes the compilation breakage by unselecting PINCTRL and making it possible no to select GPIOLIB. I'm fine with that as an interim solution, but I wonder whether we shouldn't just force PINCTRL and GPIOLIB for ARCH_SHMOBILE at some point.
Quoted 18 lines
arch/arm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/Kconfig +1
-1@@ -725,7 +725,7 @@ config ARCH_SHMOBILE select MULTI_IRQ_HANDLER select NEED_MACH_MEMORY_H select NO_IOPORT - select PINCTRL + select PINCTRL if ARCH_WANT_OPTIONAL_GPIOLIBarch/arm/Kconfig +0
-0select PM_GENERIC_DOMAINS if PM select SPARSE_IRQ help
Signature · 3 lines
Regards, Laurent Pinchart
Hi Laurent,
Quoted 43 lines · Laurent Pinchart
Hi Magnus,
Thanks for the patch.
Quoted 38 lines · On Monday 18 March 2013 22:58:18 Magnus Damm wrote:
From: Magnus Damm <[email protected]>
Modify mach-shmobile to only select PINCTRL in case of
ARCH_WANT_OPTIONAL_GPIOLIBis set.This fixes a build error triggered when adding a new SoC lacking GPIO software support (ARCH_WANT_OPTIONAL_GPIOLIB=n):
CC
drivers/tty/vt/keyboard.o
In file included fromdrivers/pinctrl/core.c:30:0:include/asm-generic/gpio.h: In function 'gpio_get_value_cansleep':include/asm-generic/gpio.h:270:2: error: implicit declaration of function '__gpio_get_value'include/asm-generic/gpio.h: In function 'gpio_set_value_cansleep':include/asm-generic/gpio.h:276:2: error: implicit declaration of function '__gpio_set_value'drivers/pinctrl/core.c: In function 'pinctrl_ready_for_gpio_range':drivers/pinctrl/core.c:297:9: error: implicit declaration of function 'gpio_to_chip'drivers/pinctrl/core.c:297:27: warning: initialization makes pointer from integer without a castdrivers/pinctrl/core.c:304:45: error: dereferencing pointer to incomplete typedrivers/pinctrl/core.c:305:26: error: dereferencing pointer to incomplete typedrivers/pinctrl/core.c:305:39: error: dereferencing pointer to incomplete type
make[2]: *** [drivers/pinctrl/core.o] Error 1
make[1]: *** [drivers/pinctrl] Error 2
make[1]: *** Waiting for unfinished jobs....
LDdrivers/sh/built-in.oSigned-off-by Magnus Damm <[email protected]>---
Using renesas.git "next"
811689afc214564c4a5f238ecf4d8bdc0e52b615
Quoted 8 lines
Quoted 3 lines
Trigger using the r8a73a4 patches that lack GPIO and PFC support.
I am more than happy to replace this patch with something cleaner.
If I'm not mistaken your patch fixes the compilation breakage by unselecting PINCTRL and making it possible no to select GPIOLIB. I'm fine with that as an interim solution, but I wonder whether we shouldn't just force PINCTRL and GPIOLIB for
ARCH_SHMOBILEat some point.
Thanks for your comments. I'm quite fine with any approach myself. My main concern is to have to the mach-shmobile code in a state so it is possible to add SoC support incrementally and start without any PFC or GPIO and then add them one by one. Or add them together. Please note that EMEV2 supports GPIO but not yet PINCTRL.
About this issue, the fact that selecting PINCTRL without GPIO results in compile error makes me think that something needs slight adjustment in the PFC code. Or perhaps PINCTRL without GPIO isn't a valid combination? But if so, why do we have separate Kconfig entries?
Thanks,
/ magnus
Hi Magnus,
Quoted 51 lines · On Tuesday 26 March 2013 13:04:25 Magnus Damm wrote:
Quoted 41 lines · Laurent Pinchart
Quoted 40 lines · On Monday 18 March 2013 22:58:18 Magnus Damm wrote:
From: Magnus Damm <[email protected]>
Modify mach-shmobile to only select PINCTRL in case of
ARCH_WANT_OPTIONAL_GPIOLIBis set.This fixes a build error triggered when adding a new SoC
lacking GPIO software support (ARCH_WANT_OPTIONAL_GPIOLIB=n):
CCdrivers/tty/vt/keyboard.oIn file included from
drivers/pinctrl/core.c:30:0:include/asm-generic/gpio.h: In function 'gpio_get_value_cansleep':include/asm-generic/gpio.h:270:2: error: implicit declaration of function '__gpio_get_value'include/asm-generic/gpio.h: In function 'gpio_set_value_cansleep':include/asm-generic/gpio.h:276:2: error: implicit declaration of function '__gpio_set_value'drivers/pinctrl/core.c: In function 'pinctrl_ready_for_gpio_range':drivers/pinctrl/core.c:297:9: error: implicit declaration of function 'gpio_to_chip'drivers/pinctrl/core.c:297:27: warning: initialization makes pointer from integer without a castdrivers/pinctrl/core.c:304:45: error: dereferencing pointer to incomplete typedrivers/pinctrl/core.c:305:26: error: dereferencing pointer to incomplete typedrivers/pinctrl/core.c:305:39: error: dereferencing pointer to incomplete type
make[2]: *** [drivers/pinctrl/core.o] Error 1
make[1]: *** [drivers/pinctrl] Error 2
make[1]: *** Waiting for unfinished jobs....LD
drivers/sh/built-in.oSigned-off-by Magnus Damm <[email protected]>---
Using renesas.git "next"
811689afc214564c4a5f238ecf4d8bdc0e52b615Quoted 8 lines
Quoted 3 lines
Trigger using the r8a73a4 patches that lack GPIO and PFC support.
I am more than happy to replace this patch with something cleaner.
If I'm not mistaken your patch fixes the compilation breakage by unselecting PINCTRL and making it possible no to select GPIOLIB. I'm fine with that as an interim solution, but I wonder whether we shouldn't just force PINCTRL and GPIOLIB for
ARCH_SHMOBILEat some point.
Quoted 5 lines
Thanks for your comments. I'm quite fine with any approach myself. My main concern is to have to the mach-shmobile code in a state so it is possible to add SoC support incrementally and start without any PFC or GPIO and then add them one by one. Or add them together. Please note that EMEV2 supports GPIO but not yet PINCTRL.
Right. In that case your patch is fine.
Quoted 3 lines
About this issue, the fact that selecting PINCTRL without GPIO results in compile error makes me think that something needs slight adjustment in the PFC code.
The above errors come from the pinctrl core (although the PFC driver might not compile either in this case). Linus, what's your opinion on this ? Do we want to support systems with pinctrl but without gpiolib ?
Quoted 2 lines
Or perhaps PINCTRL without GPIO isn't a valid combination? But if so, why do we have separate
Kconfigentries?
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 62 lines · Laurent Pinchart
Hi Magnus,
Quoted 51 lines · On Tuesday 26 March 2013 13:04:25 Magnus Damm wrote:
Quoted 41 lines · Laurent Pinchart
Quoted 40 lines · On Monday 18 March 2013 22:58:18 Magnus Damm wrote:
From: Magnus Damm <[email protected]>
Modify mach-shmobile to only select PINCTRL in case of
ARCH_WANT_OPTIONAL_GPIOLIBis set.This fixes a build error triggered when adding a new SoC
lacking GPIO software support (ARCH_WANT_OPTIONAL_GPIOLIB=n):
CCdrivers/tty/vt/keyboard.oIn file included from
drivers/pinctrl/core.c:30:0:include/asm-generic/gpio.h: In function 'gpio_get_value_cansleep':include/asm-generic/gpio.h:270:2: error: implicit declaration of function '__gpio_get_value'include/asm-generic/gpio.h: In function 'gpio_set_value_cansleep':include/asm-generic/gpio.h:276:2: error: implicit declaration of function '__gpio_set_value'drivers/pinctrl/core.c: In function 'pinctrl_ready_for_gpio_range':drivers/pinctrl/core.c:297:9: error: implicit declaration of function 'gpio_to_chip'drivers/pinctrl/core.c:297:27: warning: initialization makes pointer from integer without a castdrivers/pinctrl/core.c:304:45: error: dereferencing pointer to incomplete typedrivers/pinctrl/core.c:305:26: error: dereferencing pointer to incomplete typedrivers/pinctrl/core.c:305:39: error: dereferencing pointer to incomplete type
make[2]: *** [drivers/pinctrl/core.o] Error 1
make[1]: *** [drivers/pinctrl] Error 2
make[1]: *** Waiting for unfinished jobs....LD
drivers/sh/built-in.oSigned-off-by Magnus Damm <[email protected]>---
Using renesas.git "next"
811689afc214564c4a5f238ecf4d8bdc0e52b615Quoted 8 lines
Quoted 3 lines
Trigger using the r8a73a4 patches that lack GPIO and PFC support.
I am more than happy to replace this patch with something cleaner.
If I'm not mistaken your patch fixes the compilation breakage by unselecting PINCTRL and making it possible no to select GPIOLIB. I'm fine with that as an interim solution, but I wonder whether we shouldn't just force PINCTRL and GPIOLIB for
ARCH_SHMOBILEat some point.Quoted 5 lines
Thanks for your comments. I'm quite fine with any approach myself. My main concern is to have to the mach-shmobile code in a state so it is possible to add SoC support incrementally and start without any PFC or GPIO and then add them one by one. Or add them together. Please note that EMEV2 supports GPIO but not yet PINCTRL.
Right. In that case your patch is fine.
Quoted 10 lines
Quoted 3 lines
About this issue, the fact that selecting PINCTRL without GPIO results in compile error makes me think that something needs slight adjustment in the PFC code.
The above errors come from the pinctrl core (although the PFC driver might not compile either in this case). Linus, what's your opinion on this ? Do we want to support systems with pinctrl but without gpiolib ?
Quoted 2 lines
Or perhaps PINCTRL without GPIO isn't a valid combination? But if so, why do we have separate
Kconfigentries?
I am currently planning to apply this patch to the soc branch of the renesas tree as Magnus's "[PATCH 00/04] ARM: shmobile: r8a73a4 SoC support V3" series depends on it and I'd rather not block that series.
I realise that this patch is a temporary fix. A more permanent solution can be based on top of it.
Quoted 7 lines · Laurent Pinchart
Quoted 3 lines
About this issue, the fact that selecting PINCTRL without GPIO results in compile error makes me think that something needs slight adjustment in the PFC code.
The above errors come from the pinctrl core (although the PFC driver might not compile either in this case). Linus, what's your opinion on this ? Do we want to support systems with pinctrl but without gpiolib ?
Yes. It is perfectly legal to have pin controllers that do not correlate GPIO ranges.
Does commit 2afe8229687ec24cbc07e78449a588bb8b68f858 "pinctrl: core: add dependence of GPIOLIB" by Haojian fix this issue?
Yours,
Linus Walleij
Hi Linus,
Quoted 9 lines · On Tuesday 09 April 2013 10:06:45 Linus Walleij wrote:
Quoted 7 lines · Laurent Pinchart
Quoted 3 lines
About this issue, the fact that selecting PINCTRL without GPIO results in compile error makes me think that something needs slight adjustment in the PFC code.
The above errors come from the pinctrl core (although the PFC driver might not compile either in this case). Linus, what's your opinion on this ? Do we want to support systems with pinctrl but without gpiolib ?
Quoted 6 lines
Yes. It is perfectly legal to have pin controllers that do not correlate GPIO ranges.
Does commit
2afe8229687ec24cbc07e78449a588bb8b68f858"pinctrl: core: add dependence of GPIOLIB" by Haojian fix this issue?
Yes it does.
I've just sent a patch that makes GPIOLIB support optional in the PFC driver. Magnus, with these two, should we revert 6722f6cb763203cab775297b6e9d00834af0d6d7 ?
Signature · 3 lines
Regards, Laurent Pinchart