Skip to content

Commit

Permalink
gpiolib: add missing functions to generic fallback
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wolfram Sang authored and Linus Torvalds committed Jan 13, 2011
1 parent 0fdae42 commit 5f829e4
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions include/linux/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <linux/errno.h>

struct device;
struct gpio;
struct gpio_chip;

/*
Expand All @@ -34,6 +35,17 @@ static inline int __must_check gpio_request(unsigned gpio, const char *label)
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)
{
might_sleep();
Expand All @@ -42,6 +54,14 @@ static inline void gpio_free(unsigned gpio)
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)
{
return -ENOSYS;
Expand Down

0 comments on commit 5f829e4

Please sign in to comment.