From f805cfaed68c18a09904c7e42697669bad2d6e05 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Fri, 4 Nov 2011 11:17:46 +0100 Subject: [PATCH] --- yaml --- r: 275489 b: refs/heads/master c: df55a66addf87bc21ef5678bea238f2c1b2db48a h: refs/heads/master i: 275487: e39b54106c57bf184aca3a41bb9fd36928d8ca46 v: v3 --- [refs] | 2 +- .../arch/mips/include/asm/mach-bcm47xx/gpio.h | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 03f2a7d8c83d..ca145fa7e1c3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 798580815126c899616146f286d5cc259abb5e16 +refs/heads/master: df55a66addf87bc21ef5678bea238f2c1b2db48a diff --git a/trunk/arch/mips/include/asm/mach-bcm47xx/gpio.h b/trunk/arch/mips/include/asm/mach-bcm47xx/gpio.h index 76961cabeedf..2ef17e8df403 100644 --- a/trunk/arch/mips/include/asm/mach-bcm47xx/gpio.h +++ b/trunk/arch/mips/include/asm/mach-bcm47xx/gpio.h @@ -36,6 +36,8 @@ static inline int gpio_get_value(unsigned gpio) return -EINVAL; } +#define gpio_get_value_cansleep gpio_get_value + static inline void gpio_set_value(unsigned gpio, int value) { switch (bcm47xx_bus_type) { @@ -54,6 +56,19 @@ static inline void gpio_set_value(unsigned gpio, int value) } } +#define gpio_set_value_cansleep gpio_set_value + +static inline int gpio_cansleep(unsigned gpio) +{ + return 0; +} + +static inline int gpio_is_valid(unsigned gpio) +{ + return gpio < (BCM47XX_EXTIF_GPIO_LINES + BCM47XX_CHIPCO_GPIO_LINES); +} + + static inline int gpio_direction_input(unsigned gpio) { switch (bcm47xx_bus_type) { @@ -137,7 +152,4 @@ static inline int gpio_polarity(unsigned gpio, int value) } -/* cansleep wrappers */ -#include - #endif /* __BCM47XX_GPIO_H */