* (no subject)
@ 2017-04-28 8:20 Anatolij Gustschin
2017-04-28 8:43 ` Linus Walleij
0 siblings, 1 reply; 3+ messages in thread
From: Anatolij Gustschin @ 2017-04-28 8:20 UTC (permalink / raw)
To: linus.walleij, gnurou; +Cc: andy.shevchenko, linux-gpio, linux-kernel
Subject: [PATCH v3] gpiolib: Add stubs for gpiod lookup table interface
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>
---
Changes in v3:
- add stubs for !GPIOLIB case. Drop prototypes, these are
already in gpio/machine.h
Changes in v2:
- move gpiod_lookup_table out of #ifdef
include/linux/gpio/consumer.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h
index 8f702fc..cf3fee2 100644
--- a/include/linux/gpio/consumer.h
+++ b/include/linux/gpio/consumer.h
@@ -41,6 +41,8 @@ enum gpiod_flags {
GPIOD_FLAGS_BIT_DIR_VAL,
};
+struct gpiod_lookup_table;
+
#ifdef CONFIG_GPIOLIB
/* Return the number of GPIOs associated with a device / function */
@@ -435,6 +437,12 @@ struct gpio_desc *devm_fwnode_get_index_gpiod_from_child(struct device *dev,
return ERR_PTR(-ENOSYS);
}
+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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re:
2017-04-28 8:20 Anatolij Gustschin
@ 2017-04-28 8:43 ` Linus Walleij
2017-04-28 9:26 ` Re: Anatolij Gustschin
0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2017-04-28 8:43 UTC (permalink / raw)
To: Anatolij Gustschin
Cc: Alexandre Courbot, Andy Shevchenko, linux-gpio, linux-kernel
On Fri, Apr 28, 2017 at 10:20 AM, Anatolij Gustschin <agust@denx.de> wrote:
> Subject: [PATCH v3] gpiolib: Add stubs for gpiod lookup table interface
>
> 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>
> ---
> Changes in v3:
> - add stubs for !GPIOLIB case. Drop prototypes, these are
> already in gpio/machine.h
Yeah...
> --- a/include/linux/gpio/consumer.h
> +++ b/include/linux/gpio/consumer.h
So why should the stubs be in <linux/gpio/consumer.h>
and not in <linux/gpio/machine.h>?
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re:
2017-04-28 8:43 ` Linus Walleij
@ 2017-04-28 9:26 ` Anatolij Gustschin
0 siblings, 0 replies; 3+ messages in thread
From: Anatolij Gustschin @ 2017-04-28 9:26 UTC (permalink / raw)
To: Linus Walleij
Cc: Alexandre Courbot, Andy Shevchenko, linux-gpio, linux-kernel
On Fri, 28 Apr 2017 10:43:19 +0200
Linus Walleij linus.walleij@linaro.org wrote:
...
>> --- a/include/linux/gpio/consumer.h
>> +++ b/include/linux/gpio/consumer.h
>
>So why should the stubs be in <linux/gpio/consumer.h>
>and not in <linux/gpio/machine.h>?
good question. I'll move them to machine.h.
Thanks,
Anatolij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-04-28 9:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-28 8:20 Anatolij Gustschin
2017-04-28 8:43 ` Linus Walleij
2017-04-28 9:26 ` Re: Anatolij Gustschin
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).