9 #ifndef __BCM47XX_GPIO_H
10 #define __BCM47XX_GPIO_H
16 #define BCM47XX_EXTIF_GPIO_LINES 5
17 #define BCM47XX_CHIPCO_GPIO_LINES 16
26 #ifdef CONFIG_BCM47XX_SSB
27 case BCM47XX_BUS_TYPE_SSB:
30 #ifdef CONFIG_BCM47XX_BCMA
31 case BCM47XX_BUS_TYPE_BCMA:
39 #define gpio_get_value_cansleep gpio_get_value
44 #ifdef CONFIG_BCM47XX_SSB
45 case BCM47XX_BUS_TYPE_SSB:
47 value ? 1 << gpio : 0);
50 #ifdef CONFIG_BCM47XX_BCMA
51 case BCM47XX_BUS_TYPE_BCMA:
53 value ? 1 << gpio : 0);
59 #define gpio_set_value_cansleep gpio_set_value
66 static inline int gpio_is_valid(
unsigned gpio)
72 static inline int gpio_direction_input(
unsigned gpio)
75 #ifdef CONFIG_BCM47XX_SSB
76 case BCM47XX_BUS_TYPE_SSB:
80 #ifdef CONFIG_BCM47XX_BCMA
81 case BCM47XX_BUS_TYPE_BCMA:
90 static inline int gpio_direction_output(
unsigned gpio,
int value)
93 #ifdef CONFIG_BCM47XX_SSB
94 case BCM47XX_BUS_TYPE_SSB:
97 value ? 1 << gpio : 0);
102 #ifdef CONFIG_BCM47XX_BCMA
103 case BCM47XX_BUS_TYPE_BCMA:
106 value ? 1 << gpio : 0);
116 static inline int gpio_intmask(
unsigned gpio,
int value)
119 #ifdef CONFIG_BCM47XX_SSB
120 case BCM47XX_BUS_TYPE_SSB:
122 value ? 1 << gpio : 0);
125 #ifdef CONFIG_BCM47XX_BCMA
126 case BCM47XX_BUS_TYPE_BCMA:
128 1 << gpio, value ? 1 << gpio : 0);
135 static inline int gpio_polarity(
unsigned gpio,
int value)
138 #ifdef CONFIG_BCM47XX_SSB
139 case BCM47XX_BUS_TYPE_SSB:
141 value ? 1 << gpio : 0);
144 #ifdef CONFIG_BCM47XX_BCMA
145 case BCM47XX_BUS_TYPE_BCMA:
147 1 << gpio, value ? 1 << gpio : 0);