1 #ifndef __ASM_MIPS_MACH_BCM63XX_GPIO_H
2 #define __ASM_MIPS_MACH_BCM63XX_GPIO_H
4 #include <bcm63xx_gpio.h>
6 static inline int gpio_is_valid(int number
)
8 return (number
>= BCM63XX_GPIO_COUNT
) ? 0 : 1;
11 static inline int gpio_request(unsigned gpio
, const char *label
)
16 static inline void gpio_free(unsigned gpio
)
20 static inline int gpio_direction_input(unsigned gpio
)
22 bcm63xx_gpio_set_direction(gpio
, GPIO_DIR_IN
);
26 static inline int gpio_direction_output(unsigned gpio
, int value
)
28 bcm63xx_gpio_set_direction(gpio
, GPIO_DIR_OUT
);
32 static inline int gpio_get_value(unsigned gpio
)
34 return bcm63xx_gpio_get_datain(gpio
);
37 static inline void gpio_set_value(unsigned gpio
, int value
)
39 bcm63xx_gpio_set_dataout(gpio
, value
);
42 static inline int gpio_to_irq(unsigned gpio
)
47 static inline int irq_to_gpio(unsigned irq
)
52 #endif /* __ASM_MIPS_MACH_BCM63XX_GPIO_H */
This page took 0.046588 seconds and 5 git commands to generate.