From 5f36e231e9dbffb5264612e5b5817ab574a5e5db Mon Sep 17 00:00:00 2001 From: Alexander Shishkin Date: Fri, 11 May 2012 17:25:47 +0300 Subject: usb: chipidea: add support for roles Add some generic code for roles and implement simple role switching based on ID pin state and/or a sysfs file. At this, we also rename the device to ci_hdrc, which is what it is. The "manual" switch is made into a sysfs file and not debugfs, because it might be useful even in non-debug context. For some boards, like sheevaplug, it seems to be the only way to switch roles without modifying the hardware, since the ID pin is always grounded. Signed-off-by: Alexander Shishkin Signed-off-by: Greg Kroah-Hartman --- drivers/usb/chipidea/ci13xxx_pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/usb/chipidea/ci13xxx_pci.c') diff --git a/drivers/usb/chipidea/ci13xxx_pci.c b/drivers/usb/chipidea/ci13xxx_pci.c index 84e8ab8d4f47..f190140cf612 100644 --- a/drivers/usb/chipidea/ci13xxx_pci.c +++ b/drivers/usb/chipidea/ci13xxx_pci.c @@ -69,9 +69,9 @@ static int __devinit ci13xxx_pci_probe(struct pci_dev *pdev, pci_set_master(pdev); pci_try_set_mwi(pdev); - plat_ci = platform_device_alloc("ci_udc", -1); + plat_ci = platform_device_alloc("ci_hdrc", -1); if (!plat_ci) { - dev_err(&pdev->dev, "can't allocate ci_udc platform device\n"); + dev_err(&pdev->dev, "can't allocate ci_hdrc platform device\n"); retval = -ENOMEM; goto disable_device; } -- cgit v1.2.1