aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2011-11-04 06:17:46 -0400
committerRalf Baechle <ralf@linux-mips.org>2011-11-08 07:35:29 -0500
commitdf55a66addf87bc21ef5678bea238f2c1b2db48a (patch)
treec02268b29dd058d2a62f1d9b7e363073a7d76da6 /arch/mips
parent798580815126c899616146f286d5cc259abb5e16 (diff)
MIPS: BCM47xx: fix build with GENERIC_GPIO configuration
Since eb9ae7f2 (gpio: fix build error in include/asm-generic/gpio.h) the generic version of gpio.h calls __gpio_{set,get}_value which we do not define. Get rid of asm-generic/gpio.h and define the missing stubs directly for BCM47xx to build. Reported-by: Ralf Baechle <ralf@linux-mips.org> To: linux-mips@linux-mips.org CC: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Florian Fainelli <florian@openwrt.org> Patchwork: https://patchwork.linux-mips.org/patch/2885/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/include/asm/mach-bcm47xx/gpio.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/arch/mips/include/asm/mach-bcm47xx/gpio.h b/arch/mips/include/asm/mach-bcm47xx/gpio.h
index 76961cabeedf..2ef17e8df403 100644
--- a/arch/mips/include/asm/mach-bcm47xx/gpio.h
+++ b/arch/mips/include/asm/mach-bcm47xx/gpio.h
@@ -36,6 +36,8 @@ static inline int gpio_get_value(unsigned gpio)
36 return -EINVAL; 36 return -EINVAL;
37} 37}
38 38
39#define gpio_get_value_cansleep gpio_get_value
40
39static inline void gpio_set_value(unsigned gpio, int value) 41static inline void gpio_set_value(unsigned gpio, int value)
40{ 42{
41 switch (bcm47xx_bus_type) { 43 switch (bcm47xx_bus_type) {
@@ -54,6 +56,19 @@ static inline void gpio_set_value(unsigned gpio, int value)
54 } 56 }
55} 57}
56 58
59#define gpio_set_value_cansleep gpio_set_value
60
61static inline int gpio_cansleep(unsigned gpio)
62{
63 return 0;
64}
65
66static inline int gpio_is_valid(unsigned gpio)
67{
68 return gpio < (BCM47XX_EXTIF_GPIO_LINES + BCM47XX_CHIPCO_GPIO_LINES);
69}
70
71
57static inline int gpio_direction_input(unsigned gpio) 72static inline int gpio_direction_input(unsigned gpio)
58{ 73{
59 switch (bcm47xx_bus_type) { 74 switch (bcm47xx_bus_type) {
@@ -137,7 +152,4 @@ static inline int gpio_polarity(unsigned gpio, int value)
137} 152}
138 153
139 154
140/* cansleep wrappers */
141#include <asm-generic/gpio.h>
142
143#endif /* __BCM47XX_GPIO_H */ 155#endif /* __BCM47XX_GPIO_H */