linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gpio: winbond: fix ISA_BUS_API dependency
@ 2018-01-11  8:35 Arnd Bergmann
  2018-01-11  9:18 ` Linus Walleij
  2018-01-11 13:00 ` William Breathitt Gray
  0 siblings, 2 replies; 5+ messages in thread
From: Arnd Bergmann @ 2018-01-11  8:35 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Arnd Bergmann, William Breathitt Gray, Guenter Roeck,
	Maciej S . Szmigiero, Andy Shevchenko, linux-gpio, linux-kernel

The newly added GPIO driver for winbond chipsets causes a
circular dependency warning in Kconfig:

drivers/gpio/Kconfig:13:error: recursive dependency detected!
drivers/gpio/Kconfig:13:	symbol GPIOLIB is selected by STX104
drivers/iio/adc/Kconfig:699:	symbol STX104 depends on ISA_BUS_API
arch/Kconfig:830:	symbol ISA_BUS_API is selected by GPIO_WINBOND
drivers/gpio/Kconfig:701:	symbol GPIO_WINBOND depends on GPIOLIB

The underlying problem is that ISA_BUS_API is not meant to be selected by
device drivers, instead it is provided by the architectures that support
ISA add-on card devices, or in case of x86 have this explicitly enabled.

This particular driver appears to be different from the other ISA_BUS_API
based drivers, in that it is not normally an add-on card (ISA or PC104)
but instead is an LPC-attached component on the mainboard. We already
support other functionality provided by this chip, at least
drivers/watchdog/w83627hf_wdt.c and drivers/hwmon/w83627ehf.c, plus
there is a discovery function for this hardware in
drivers/parport/parport_pc.c.

If we want to use this driver without having to enable CONFIG_EXPERT,
it might be better to not use the isa_bus_type for it, but rather
turn it into a platform_driver, acpi_driver or add an MFD for it that
is shared with the wdt and hwmon portions and does the probing.

For now, this patch fixes the dependency by changing 'select' into
'depends on'.

Cc: William Breathitt Gray <vilhelm.gray@gmail.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Fixes: a0d65009411c ("gpio: winbond: Add driver")
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 440af077cc76..8dbb2280538d 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -700,7 +700,7 @@ config GPIO_TS5500
 
 config GPIO_WINBOND
 	tristate "Winbond Super I/O GPIO support"
-	select ISA_BUS_API
+	depends on ISA_BUS_API
 	help
 	  This option enables support for GPIOs found on Winbond Super I/O
 	  chips.
-- 
2.9.0

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

end of thread, other threads:[~2018-01-11 13:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-11  8:35 [PATCH] gpio: winbond: fix ISA_BUS_API dependency Arnd Bergmann
2018-01-11  9:18 ` Linus Walleij
2018-01-11 12:40   ` Maciej S. Szmigiero
2018-01-11 12:42   ` William Breathitt Gray
2018-01-11 13:00 ` William Breathitt Gray

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).