mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Lucas Stach <l.stach@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH] gpio: move active state function stubs to GPIOLIB
Date: Mon, 10 Jul 2017 11:16:45 +0200	[thread overview]
Message-ID: <20170710091645.7141-1-l.stach@pengutronix.de> (raw)

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>
---
 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


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

                 reply	other threads:[~2017-07-10  9:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170710091645.7141-1-l.stach@pengutronix.de \
    --to=l.stach@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox