2 * linux/include/asm-arm/arch-pxa/udc.h
4 * This supports machine-specific differences in how the PXA2xx
5 * USB Device Controller (UDC) is wired.
8 #include <asm/mach/udc_pxa2xx.h>
10 extern void pxa_set_udc_info(struct pxa2xx_udc_mach_info *info);
12 static inline int udc_gpio_to_irq(unsigned gpio)
14 return IRQ_GPIO(gpio & GPIO_MD_MASK_NR);
17 static inline void udc_gpio_init_vbus(unsigned gpio)
19 pxa_gpio_mode((gpio & GPIO_MD_MASK_NR) | GPIO_IN);
22 static inline void udc_gpio_init_pullup(unsigned gpio)
24 pxa_gpio_mode((gpio & GPIO_MD_MASK_NR) | GPIO_OUT | GPIO_DFLT_LOW);
27 static inline int udc_gpio_get(unsigned gpio)
29 return (GPLR(gpio) & GPIO_bit(gpio)) != 0;
32 static inline void udc_gpio_set(unsigned gpio, int is_on)
34 int mask = GPIO_bit(gpio);