All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpio: raspberrypi-ext: fix firmware dependency
@ 2018-02-28 13:48 Arnd Bergmann
  2018-02-28 21:47 ` Baruch Siach
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Arnd Bergmann @ 2018-02-28 13:48 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Stefan Wahren, Dave Stevenson, Baruch Siach, Arnd Bergmann,
	linux-gpio, linux-kernel

When the firmware driver is a loadable module, the gpio driver cannot be
built-in:

drivers/gpio/gpio-raspberrypi-exp.o: In function `rpi_exp_gpio_set':
gpio-raspberrypi-exp.c:(.text+0xb4): undefined reference to `rpi_firmware_property'
drivers/gpio/gpio-raspberrypi-exp.o: In function `rpi_exp_gpio_get':
gpio-raspberrypi-exp.c:(.text+0x1ec): undefined reference to `rpi_firmware_property'
drivers/gpio/gpio-raspberrypi-exp.o: In function `rpi_exp_gpio_get_direction':
gpio-raspberrypi-exp.c:(.text+0x360): undefined reference to `rpi_firmware_property'
drivers/gpio/gpio-raspberrypi-exp.o: In function `rpi_exp_gpio_get_polarity':
gpio-raspberrypi-exp.c:(.text+0x4d4): undefined reference to `rpi_firmware_property'
drivers/gpio/gpio-raspberrypi-exp.o: In function `rpi_exp_gpio_dir_out':
gpio-raspberrypi-exp.c:(.text+0x670): undefined reference to `rpi_firmware_property'
drivers/gpio/gpio-raspberrypi-exp.o:gpio-raspberrypi-exp.c:(.text+0x7fc): more undefined references to `rpi_firmware_property' follow
drivers/gpio/gpio-raspberrypi-exp.o: In function `rpi_exp_gpio_dir_in':
drivers/gpio/gpio-raspberrypi-exp.o: In function `rpi_exp_gpio_probe':
gpio-raspberrypi-exp.c:(.text+0x93c): undefined reference to `rpi_firmware_get'

We already have a Kconfig dependency for it, but when compile-testing, it
is disregarded.

This changes the dependency so that compile-testing is only done when the
firmware driver is completely disabled.

Fixes: a98d90e7d588 ("gpio: raspberrypi-exp: Driver for RPi3 GPIO expander via mailbox service")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/gpio/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 2ecd2adbaec6..52a8b0a6f4e1 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -126,7 +126,7 @@ config GPIO_RASPBERRYPI_EXP
 	tristate "Raspberry Pi 3 GPIO Expander"
 	default RASPBERRYPI_FIRMWARE
 	depends on OF_GPIO
-	depends on (ARCH_BCM2835 && RASPBERRYPI_FIRMWARE) || COMPILE_TEST
+	depends on (ARCH_BCM2835 && RASPBERRYPI_FIRMWARE) || (COMPILE_TEST && !RASPBERRYPI_FIRMWARE)
 	help
 	  Turn on GPIO support for the expander on Raspberry Pi 3 boards, using
 	  the firmware mailbox to communicate with VideoCore on BCM283x chips.
-- 
2.9.0

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

end of thread, other threads:[~2018-03-02  8:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-28 13:48 [PATCH] gpio: raspberrypi-ext: fix firmware dependency Arnd Bergmann
2018-02-28 21:47 ` Baruch Siach
2018-02-28 22:08   ` Arnd Bergmann
2018-03-01  9:20     ` Baruch Siach
2018-03-01  9:28 ` Linus Walleij
2018-03-01 23:33   ` Baruch Siach
2018-03-02  8:49     ` Linus Walleij
2018-03-02  8:47 ` 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.