mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 14:11:20 +00:00
gpiolib: add missing functions to generic fallback
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Greg KH <gregkh@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
0fdae42d36
commit
5f829e405e
1 changed files with 20 additions and 0 deletions
|
@ -13,6 +13,7 @@
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
|
|
||||||
struct device;
|
struct device;
|
||||||
|
struct gpio;
|
||||||
struct gpio_chip;
|
struct gpio_chip;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -34,6 +35,17 @@ static inline int __must_check gpio_request(unsigned gpio, const char *label)
|
||||||
return -ENOSYS;
|
return -ENOSYS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int __must_check gpio_request_one(unsigned gpio,
|
||||||
|
unsigned long flags, const char *label)
|
||||||
|
{
|
||||||
|
return -ENOSYS;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int __must_check gpio_request_array(struct gpio *array, size_t num)
|
||||||
|
{
|
||||||
|
return -ENOSYS;
|
||||||
|
}
|
||||||
|
|
||||||
static inline void gpio_free(unsigned gpio)
|
static inline void gpio_free(unsigned gpio)
|
||||||
{
|
{
|
||||||
might_sleep();
|
might_sleep();
|
||||||
|
@ -42,6 +54,14 @@ static inline void gpio_free(unsigned gpio)
|
||||||
WARN_ON(1);
|
WARN_ON(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void gpio_free_array(struct gpio *array, size_t num)
|
||||||
|
{
|
||||||
|
might_sleep();
|
||||||
|
|
||||||
|
/* GPIO can never have been requested */
|
||||||
|
WARN_ON(1);
|
||||||
|
}
|
||||||
|
|
||||||
static inline int __must_check gpio_direction_input(unsigned gpio)
|
static inline int __must_check gpio_direction_input(unsigned gpio)
|
||||||
{
|
{
|
||||||
return -ENOSYS;
|
return -ENOSYS;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue