diff options
Diffstat (limited to 'drivers/usb/gadget/pxa2xx_udc.c')
-rw-r--r-- | drivers/usb/gadget/pxa2xx_udc.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/usb/gadget/pxa2xx_udc.c b/drivers/usb/gadget/pxa2xx_udc.c index 27904a56494b..f01890dc8751 100644 --- a/drivers/usb/gadget/pxa2xx_udc.c +++ b/drivers/usb/gadget/pxa2xx_udc.c | |||
@@ -155,7 +155,7 @@ static int is_vbus_present(void) | |||
155 | struct pxa2xx_udc_mach_info *mach = the_controller->mach; | 155 | struct pxa2xx_udc_mach_info *mach = the_controller->mach; |
156 | 156 | ||
157 | if (mach->gpio_vbus) | 157 | if (mach->gpio_vbus) |
158 | return pxa_gpio_get(mach->gpio_vbus); | 158 | return udc_gpio_get(mach->gpio_vbus); |
159 | if (mach->udc_is_connected) | 159 | if (mach->udc_is_connected) |
160 | return mach->udc_is_connected(); | 160 | return mach->udc_is_connected(); |
161 | return 1; | 161 | return 1; |
@@ -167,7 +167,7 @@ static void pullup_off(void) | |||
167 | struct pxa2xx_udc_mach_info *mach = the_controller->mach; | 167 | struct pxa2xx_udc_mach_info *mach = the_controller->mach; |
168 | 168 | ||
169 | if (mach->gpio_pullup) | 169 | if (mach->gpio_pullup) |
170 | pxa_gpio_set(mach->gpio_pullup, 0); | 170 | udc_gpio_set(mach->gpio_pullup, 0); |
171 | else if (mach->udc_command) | 171 | else if (mach->udc_command) |
172 | mach->udc_command(PXA2XX_UDC_CMD_DISCONNECT); | 172 | mach->udc_command(PXA2XX_UDC_CMD_DISCONNECT); |
173 | } | 173 | } |
@@ -177,7 +177,7 @@ static void pullup_on(void) | |||
177 | struct pxa2xx_udc_mach_info *mach = the_controller->mach; | 177 | struct pxa2xx_udc_mach_info *mach = the_controller->mach; |
178 | 178 | ||
179 | if (mach->gpio_pullup) | 179 | if (mach->gpio_pullup) |
180 | pxa_gpio_set(mach->gpio_pullup, 1); | 180 | udc_gpio_set(mach->gpio_pullup, 1); |
181 | else if (mach->udc_command) | 181 | else if (mach->udc_command) |
182 | mach->udc_command(PXA2XX_UDC_CMD_CONNECT); | 182 | mach->udc_command(PXA2XX_UDC_CMD_CONNECT); |
183 | } | 183 | } |
@@ -1755,7 +1755,7 @@ lubbock_vbus_irq(int irq, void *_dev) | |||
1755 | static irqreturn_t udc_vbus_irq(int irq, void *_dev) | 1755 | static irqreturn_t udc_vbus_irq(int irq, void *_dev) |
1756 | { | 1756 | { |
1757 | struct pxa2xx_udc *dev = _dev; | 1757 | struct pxa2xx_udc *dev = _dev; |
1758 | int vbus = pxa_gpio_get(dev->mach->gpio_vbus); | 1758 | int vbus = udc_gpio_get(dev->mach->gpio_vbus); |
1759 | 1759 | ||
1760 | pxa2xx_udc_vbus_session(&dev->gadget, vbus); | 1760 | pxa2xx_udc_vbus_session(&dev->gadget, vbus); |
1761 | return IRQ_HANDLED; | 1761 | return IRQ_HANDLED; |
@@ -2545,15 +2545,13 @@ static int __init pxa2xx_udc_probe(struct platform_device *pdev) | |||
2545 | dev->dev = &pdev->dev; | 2545 | dev->dev = &pdev->dev; |
2546 | dev->mach = pdev->dev.platform_data; | 2546 | dev->mach = pdev->dev.platform_data; |
2547 | if (dev->mach->gpio_vbus) { | 2547 | if (dev->mach->gpio_vbus) { |
2548 | vbus_irq = IRQ_GPIO(dev->mach->gpio_vbus & GPIO_MD_MASK_NR); | 2548 | udc_gpio_init_vbus(dev->mach->gpio_vbus); |
2549 | pxa_gpio_mode((dev->mach->gpio_vbus & GPIO_MD_MASK_NR) | 2549 | vbus_irq = udc_gpio_to_irq(dev->mach->gpio_vbus); |
2550 | | GPIO_IN); | ||
2551 | set_irq_type(vbus_irq, IRQT_BOTHEDGE); | 2550 | set_irq_type(vbus_irq, IRQT_BOTHEDGE); |
2552 | } else | 2551 | } else |
2553 | vbus_irq = 0; | 2552 | vbus_irq = 0; |
2554 | if (dev->mach->gpio_pullup) | 2553 | if (dev->mach->gpio_pullup) |
2555 | pxa_gpio_mode((dev->mach->gpio_pullup & GPIO_MD_MASK_NR) | 2554 | udc_gpio_init_pullup(dev->mach->gpio_pullup); |
2556 | | GPIO_OUT | GPIO_DFLT_LOW); | ||
2557 | 2555 | ||
2558 | init_timer(&dev->timer); | 2556 | init_timer(&dev->timer); |
2559 | dev->timer.function = udc_watchdog; | 2557 | dev->timer.function = udc_watchdog; |