[PATCH] gpio: move active state function stubs to GPIOLIB

Lucas Stach l.stach at pengutronix.de
Mon Jul 10 02:16:45 PDT 2017


Those are only implemented by GPIOLIB, not by GENERIC_GPIO.
Fixes like failure on old platforms, that aren't converted to
gpiolib, yet.

Signed-off-by: Lucas Stach <l.stach at pengutronix.de>
---
 include/gpio.h | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/include/gpio.h b/include/gpio.h
index 56aae2223669..f5262aac423e 100644
--- a/include/gpio.h
+++ b/include/gpio.h
@@ -6,11 +6,6 @@ void gpio_set_value(unsigned gpio, int value);
 int gpio_get_value(unsigned gpio);
 int gpio_direction_output(unsigned gpio, int value);
 int gpio_direction_input(unsigned gpio);
-
-void gpio_set_active(unsigned gpio, bool state);
-int gpio_is_active(unsigned gpio);
-int gpio_direction_active(unsigned gpio, bool state);
-
 #else
 static inline void gpio_set_value(unsigned gpio, int value)
 {
@@ -27,7 +22,13 @@ static inline int gpio_direction_input(unsigned gpio)
 {
 	return -EINVAL;
 }
+#endif
 
+#ifdef CONFIG_GPIOLIB
+void gpio_set_active(unsigned gpio, bool state);
+int gpio_is_active(unsigned gpio);
+int gpio_direction_active(unsigned gpio, bool state);
+#else
 static inline void gpio_set_active(unsigned gpio, int value)
 {
 }
-- 
2.11.0




More information about the barebox mailing list