aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/ci13xxx_pci.c
diff options
context:
space:
mode:
authorPavankumar Kondeti <pkondeti@codeaurora.org>2010-12-07 17:54:02 +0530
committerGreg Kroah-Hartman <gregkh@suse.de>2010-12-10 14:23:33 -0800
commitf01ef5748f4c4dcd2e49ccb7d75dc113219559d2 (patch)
treef67c19262909832ad72f11f0b1eb7083bcac0578 /drivers/usb/gadget/ci13xxx_pci.c
parent61948ee4d525174cceee2135a38a482124fcc02c (diff)
downloadkernel_samsung_smdk4412-f01ef5748f4c4dcd2e49ccb7d75dc113219559d2.zip
kernel_samsung_smdk4412-f01ef5748f4c4dcd2e49ccb7d75dc113219559d2.tar.gz
kernel_samsung_smdk4412-f01ef5748f4c4dcd2e49ccb7d75dc113219559d2.tar.bz2
USB: gadget: Introduce ci13xxx_udc_driver struct
Introduces ci13xxx_udc_driver struct for bus glue drivers to hint ci13xxx_udc core about their special requirements. The flags include avoiding hardware register access when controller is not in peripheral mode, enabling pull-up upon VBUS, disabling streaming mode and dependency on transceiver driver. Initialize gadget_ops in udc_probe so that transceiver can notify VBUS presence even when no gadget driver is bounded. A notify_event callback is embedded in the same struct. This patch implements two events called CONTROLLER_RESET_EVENT and CONTROLLER_STOPPED_EVENT to notify the bus glue driver after resetting and stopping the controller for performing SoC specific quirks. Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/ci13xxx_pci.c')
-rw-r--r--drivers/usb/gadget/ci13xxx_pci.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/usb/gadget/ci13xxx_pci.c b/drivers/usb/gadget/ci13xxx_pci.c
index 7a0f153..883ab5e 100644
--- a/drivers/usb/gadget/ci13xxx_pci.c
+++ b/drivers/usb/gadget/ci13xxx_pci.c
@@ -38,6 +38,10 @@ static irqreturn_t ci13xxx_pci_irq(int irq, void *pdev)
return udc_irq();
}
+static struct ci13xxx_udc_driver ci13xxx_pci_udc_driver = {
+ .name = UDC_DRIVER_NAME,
+};
+
/**
* ci13xxx_pci_probe: PCI probe
* @pdev: USB device controller being probed
@@ -82,7 +86,7 @@ static int __devinit ci13xxx_pci_probe(struct pci_dev *pdev,
pci_set_master(pdev);
pci_try_set_mwi(pdev);
- retval = udc_probe(&pdev->dev, regs, UDC_DRIVER_NAME);
+ retval = udc_probe(&ci13xxx_pci_udc_driver, &pdev->dev, regs);
if (retval)
goto iounmap;