All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pinctrl: PINCTRL_SAMSUNG and PINCTRL_EXYNOS4 need to depend on OF && GPIOLIB
@ 2012-11-06  7:04 Axel Lin
  2012-11-06  9:03 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2012-11-06  7:04 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Kyungmin Park, Thomas Abraham, Tomasz Figa, linux-kernel

This patch fixes below build error when !CONFIG_OF_GPIO.

  CC      drivers/pinctrl/pinctrl-samsung.o
drivers/pinctrl/pinctrl-samsung.c: In function 'samsung_pinctrl_parse_dt_pins':
drivers/pinctrl/pinctrl-samsung.c:557:19: warning: unused variable 'prop' [-Wunused-variable]
drivers/pinctrl/pinctrl-samsung.c: In function 'samsung_gpiolib_register':
drivers/pinctrl/pinctrl-samsung.c:797:5: error: 'struct gpio_chip' has no member named 'of_node'
make[2]: *** [drivers/pinctrl/pinctrl-samsung.o] Error 1
make[1]: *** [drivers/pinctrl] Error 2
make: *** [drivers] Error 2

The samsung pinctrl driver supports only device tree enabled platforms.
Thus make PINCTRL_SAMSUNG depend on OF && GPIOLIB.

The reason to depend on GPIOLIB is CONFIG_OF_GPIO only available when GPIOLIB
is selected.
Since PINCTRL_EXYNOS4 select PINCTRL_SAMSUNG, thus also make PINCTRL_EXYNOS4
depend on OF && GPIOLIB.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
Hi Thomas,

If I simply add "select OF_GPIO" for PINCTRL_SAMSUNG, I got below build warning:
warning: (PINCTRL_SAMSUNG) selects OF_GPIO which has unmet direct dependencies (GPIOLIB && OF && !SPARC)

So I make PINCTRL_SAMSUNG depend on OF && GPIOLIB.

Regards,
Axel

 drivers/pinctrl/Kconfig |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
index 6777a4c..6d5a50b 100644
--- a/drivers/pinctrl/Kconfig
+++ b/drivers/pinctrl/Kconfig
@@ -188,11 +188,13 @@ config PINCTRL_COH901
 
 config PINCTRL_SAMSUNG
 	bool "Samsung pinctrl driver"
+	depends on OF && GPIOLIB
 	select PINMUX
 	select PINCONF
 
 config PINCTRL_EXYNOS4
 	bool "Pinctrl driver data for Exynos4 SoC"
+	depends on OF && GPIOLIB
 	select PINCTRL_SAMSUNG
 
 source "drivers/pinctrl/mvebu/Kconfig"
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-11-06  9:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-06  7:04 [PATCH] pinctrl: PINCTRL_SAMSUNG and PINCTRL_EXYNOS4 need to depend on OF && GPIOLIB Axel Lin
2012-11-06  9:03 ` Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.