@@ -22,63 +22,75 @@ extern int gpio_to_irq(unsigned gpio);
2222static inline int gpio_get_value (unsigned gpio )
2323{
2424 switch (bcm47xx_bus_type ) {
25+ #ifdef CONFIG_BCM47XX_SSB
2526 case BCM47XX_BUS_TYPE_SSB :
2627 return ssb_gpio_in (& bcm47xx_bus .ssb , 1 << gpio );
28+ #endif
2729 }
2830 return - EINVAL ;
2931}
3032
3133static inline void gpio_set_value (unsigned gpio , int value )
3234{
3335 switch (bcm47xx_bus_type ) {
36+ #ifdef CONFIG_BCM47XX_SSB
3437 case BCM47XX_BUS_TYPE_SSB :
3538 ssb_gpio_out (& bcm47xx_bus .ssb , 1 << gpio ,
3639 value ? 1 << gpio : 0 );
40+ #endif
3741 }
3842}
3943
4044static inline int gpio_direction_input (unsigned gpio )
4145{
4246 switch (bcm47xx_bus_type ) {
47+ #ifdef CONFIG_BCM47XX_SSB
4348 case BCM47XX_BUS_TYPE_SSB :
4449 ssb_gpio_outen (& bcm47xx_bus .ssb , 1 << gpio , 0 );
4550 return 0 ;
51+ #endif
4652 }
4753 return - EINVAL ;
4854}
4955
5056static inline int gpio_direction_output (unsigned gpio , int value )
5157{
5258 switch (bcm47xx_bus_type ) {
59+ #ifdef CONFIG_BCM47XX_SSB
5360 case BCM47XX_BUS_TYPE_SSB :
5461 /* first set the gpio out value */
5562 ssb_gpio_out (& bcm47xx_bus .ssb , 1 << gpio ,
5663 value ? 1 << gpio : 0 );
5764 /* then set the gpio mode */
5865 ssb_gpio_outen (& bcm47xx_bus .ssb , 1 << gpio , 1 << gpio );
5966 return 0 ;
67+ #endif
6068 }
6169 return - EINVAL ;
6270}
6371
6472static inline int gpio_intmask (unsigned gpio , int value )
6573{
6674 switch (bcm47xx_bus_type ) {
75+ #ifdef CONFIG_BCM47XX_SSB
6776 case BCM47XX_BUS_TYPE_SSB :
6877 ssb_gpio_intmask (& bcm47xx_bus .ssb , 1 << gpio ,
6978 value ? 1 << gpio : 0 );
7079 return 0 ;
80+ #endif
7181 }
7282 return - EINVAL ;
7383}
7484
7585static inline int gpio_polarity (unsigned gpio , int value )
7686{
7787 switch (bcm47xx_bus_type ) {
88+ #ifdef CONFIG_BCM47XX_SSB
7889 case BCM47XX_BUS_TYPE_SSB :
7990 ssb_gpio_polarity (& bcm47xx_bus .ssb , 1 << gpio ,
8091 value ? 1 << gpio : 0 );
8192 return 0 ;
93+ #endif
8294 }
8395 return - EINVAL ;
8496}
0 commit comments