Thread (4 messages) flat view 4 messages, 2 authors, 2014-06-05
STALE4494d

[PATCH] i2c: mux: pca954x needs gpiolib

From: arnd@arndb.de (Arnd Bergmann)
Date: 2014-06-05 10:44:47
Also in: linux-i2c
Subsystem: i2c muxes, i2c subsystem, the rest · Maintainers: Peter Rosin, Andi Shyti, Linus Torvalds

commit 4807e8459bce ("i2c: mux: pca954x: Use the descriptor-based GPIO
API") moved this driver over to the gpio descriptor API, which means
we now have a dependency on GPIOLIB and get this build error when
it is disabled:

i2c/muxes/i2c-mux-pca954x.c: In function 'pca954x_probe':
i2c/muxes/i2c-mux-pca954x.c:204:2: error: implicit declaration of function 'devm_gpiod_get' [-Werror=implicit-function-declaration]
  gpio = devm_gpiod_get(&client->dev, "reset");
  ^
i2c/muxes/i2c-mux-pca954x.c:204:7: warning: assignment makes pointer from integer without a cast [enabled by default]
  gpio = devm_gpiod_get(&client->dev, "reset");
       ^
i2c/muxes/i2c-mux-pca954x.c:206:3: error: implicit declaration of function 'gpiod_direction_output' [-Werror=implicit-function-declaration]
   gpiod_direction_output(gpio, 0);
   ^

This adds the dependency in Kconfig as we do for other similar drivers.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Linus Walleij <redacted>
Cc: Wolfram Sang <redacted>
diff --git a/drivers/i2c/muxes/Kconfig b/drivers/i2c/muxes/Kconfig
index f7f9865b..f6d313e 100644
--- a/drivers/i2c/muxes/Kconfig
+++ b/drivers/i2c/muxes/Kconfig
@@ -40,6 +40,7 @@ config I2C_MUX_PCA9541
 
 config I2C_MUX_PCA954x
 	tristate "Philips PCA954x I2C Mux/switches"
+	depends on GPIOLIB
 	help
 	  If you say yes here you get support for the Philips PCA954x
 	  I2C mux/switch devices.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help