1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */ 2*4882a593Smuzhiyun /* 3*4882a593Smuzhiyun * This supports machine-specific differences in how the PXA2xx 4*4882a593Smuzhiyun * USB Device Controller (UDC) is wired. 5*4882a593Smuzhiyun * 6*4882a593Smuzhiyun * It is set in linux/arch/arm/mach-pxa/<machine>.c or in 7*4882a593Smuzhiyun * linux/arch/mach-ixp4xx/<machine>.c and used in 8*4882a593Smuzhiyun * the probe routine of linux/drivers/usb/gadget/pxa2xx_udc.c 9*4882a593Smuzhiyun */ 10*4882a593Smuzhiyun #ifndef PXA2XX_UDC_H 11*4882a593Smuzhiyun #define PXA2XX_UDC_H 12*4882a593Smuzhiyun 13*4882a593Smuzhiyun struct pxa2xx_udc_mach_info { 14*4882a593Smuzhiyun int (*udc_is_connected)(void); /* do we see host? */ 15*4882a593Smuzhiyun void (*udc_command)(int cmd); 16*4882a593Smuzhiyun #define PXA2XX_UDC_CMD_CONNECT 0 /* let host see us */ 17*4882a593Smuzhiyun #define PXA2XX_UDC_CMD_DISCONNECT 1 /* so host won't see us */ 18*4882a593Smuzhiyun 19*4882a593Smuzhiyun /* Boards following the design guidelines in the developer's manual, 20*4882a593Smuzhiyun * with on-chip GPIOs not Lubbock's weird hardware, can have a sane 21*4882a593Smuzhiyun * VBUS IRQ and omit the methods above. Store the GPIO number 22*4882a593Smuzhiyun * here. Note that sometimes the signals go through inverters... 23*4882a593Smuzhiyun */ 24*4882a593Smuzhiyun bool gpio_pullup_inverted; 25*4882a593Smuzhiyun int gpio_pullup; /* high == pullup activated */ 26*4882a593Smuzhiyun }; 27*4882a593Smuzhiyun 28*4882a593Smuzhiyun #endif 29