From: Anatolij Gustschin <agust@denx.de>
To: linux-gpio@vger.kernel.org
Cc: Linus Walleij <linus.walleij@linaro.org>,
Alexandre Courbot <gnurou@gmail.com>,
Andy Shevchenko <andy.shevchenko@gmail.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] gpiolib: Add stubs for gpiod lookup table interface
Date: Mon, 24 Apr 2017 16:04:22 +0200 [thread overview]
Message-ID: <1493042662-30435-1-git-send-email-agust@denx.de> (raw)
In-Reply-To: <CAHp75VeHmOpSAAZM87_0Y120mrXpPG0aCns=Zp5tBTMh3GBXmw@mail.gmail.com>
Add stubs for gpiod_add_lookup_table() and gpiod_remove_lookup_table()
for the !GPIOLIB case to prevent build errors. Also add prototypes.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
include/linux/gpio/consumer.h | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h
index 933d936..6c0cc67 100644
--- a/include/linux/gpio/consumer.h
+++ b/include/linux/gpio/consumer.h
@@ -144,6 +144,11 @@ struct gpio_desc *devm_fwnode_get_index_gpiod_from_child(struct device *dev,
enum gpiod_flags flags,
const char *label);
+struct gpiod_lookup_table;
+
+void gpiod_add_lookup_table(struct gpiod_lookup_table *table);
+void gpiod_remove_lookup_table(struct gpiod_lookup_table *table);
+
#else /* CONFIG_GPIOLIB */
static inline int gpiod_count(struct device *dev, const char *con_id)
@@ -435,6 +440,16 @@ struct gpio_desc *devm_fwnode_get_index_gpiod_from_child(struct device *dev,
return ERR_PTR(-ENOSYS);
}
+struct gpiod_lookup_table;
+
+static inline void gpiod_add_lookup_table(struct gpiod_lookup_table *table)
+{
+}
+
+static inline void gpiod_remove_lookup_table(struct gpiod_lookup_table *table)
+{
+}
+
#endif /* CONFIG_GPIOLIB */
static inline
--
2.7.4
next prev parent reply other threads:[~2017-04-24 14:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-20 21:23 [PATCH] gpio: export add/remove lookup table functions Anatolij Gustschin
2017-04-21 19:24 ` Andy Shevchenko
2017-04-24 14:04 ` Anatolij Gustschin [this message]
2017-04-26 21:31 ` [PATCH] gpiolib: Add stubs for gpiod lookup table interface Andy Shevchenko
2017-04-24 14:08 ` [PATCH] gpio: export add/remove lookup table functions Anatolij Gustschin
2017-05-22 8:58 ` Linus Walleij
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=1493042662-30435-1-git-send-email-agust@denx.de \
--to=agust@denx.de \
--cc=andy.shevchenko@gmail.com \
--cc=gnurou@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).