summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2017-07-07 14:53:30 +0200
committerLucas Stach <l.stach@pengutronix.de>2017-07-10 11:16:09 +0200
commitc79da7b24f57dab75ad3b5084da7b6a834ba8e8a (patch)
treeb164fc948f8b30f378f163319a3a495f43a4b339
parent543dbbc8994447bb901fc1d22a779232f38d3146 (diff)
downloadbarebox-c79da7b24f57dab75ad3b5084da7b6a834ba8e8a.tar.gz
gpio: move active state function stubs to GPIOLIB
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@pengutronix.de>
-rw-r--r--include/gpio.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/gpio.h b/include/gpio.h
index 56aae22..f5262aa 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)
{
}