summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-05-15USB: ir-usb.c: remove dbg() usageGreg Kroah-Hartman
dbg() is a usb-serial specific macro. This patch converts the ir-usb.c driver to use dev_dbg() instead to tie into the dynamic debug infrastructure. CC: Rusty Russell <rusty@rustcorp.com.au> CC: Johan Hovold <jhovold@gmail.com> CC: Alan Stern <stern@rowland.harvard.edu> CC: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15USB: ipaq.c: remove dbg() usageGreg Kroah-Hartman
dbg() is a usb-serial specific macro. This patch converts the ipaq.c driver to use dev_dbg() instead to tie into the dynamic debug infrastructure. CC: Rusty Russell <rusty@rustcorp.com.au> CC: Johan Hovold <jhovold@gmail.com> CC: Alan Stern <stern@rowland.harvard.edu> CC: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15USB: generic.c: remove dbg() usageGreg Kroah-Hartman
dbg() is a usb-serial specific macro. This patch converts the generic.c driver to use dev_dbg() instead to tie into the dynamic debug infrastructure. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15USB: f81232.c: remove dbg() usageGreg Kroah-Hartman
dbg() is a usb-serial specific macro. This patch converts the f81232.c driver to use dev_dbg() instead to tie into the dynamic debug infrastructure. CC: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15USB: belkin_sa.c: remove dbg() usageGreg Kroah-Hartman
dbg() is a usb-serial specific macro. This patch converts the belkin_sa.c driver to use dev_dbg() instead to tie into the dynamic debug infrastructure. CC: William Greathouse <wgreathouse@smva.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15USB: ark3116.c: remove dbg() usageGreg Kroah-Hartman
dbg() is a usb-serial specific macro. This patch converts the ark3116.c driver to use dev_dbg() instead to tie into the dynamic debug infrastructure. CC: Rusty Russell <rusty@rustcorp.com.au> CC: Alan Stern <stern@rowland.harvard.edu> CC: Mauro Carvalho Chehab <mchehab@redhat.com> CC: Bart Hartgers <bart.hartgers@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15USB: aircable.c: remove dbg() usageGreg Kroah-Hartman
dbg() is a usb-serial specific macro. This patch converts the aircable.c driver to use dev_dbg() instead to tie into the dynamic debug infrastructure. CC: Paul Gortmaker <paul.gortmaker@windriver.com> CC: Rusty Russell <rusty@rustcorp.com.au> CC: Alan Stern <stern@rowland.harvard.edu> CC: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15USB: serial: sierra: put reset_resume callback back.Greg Kroah-Hartman
A few patches ago, I removed the reset_resume callback in this driver. Now that the usb-serial core supports reset_resume, put this driver callback back as well, so it should work identically to how it was originally. Now if this function really is doing what it should be doing, well, that's a different story, but we are at least doing the identical thing that we were before... Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Johan Hovold <jhovold@gmail.com> Cc: Anton Samokhvalov <pg83@yandex.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15USB: serial: ch341: put reset_resume callback back.Greg Kroah-Hartman
A few patches ago, I removed the reset_resume callback, changing it to resume instead. Now that the usb-serial core supports reset_resume, put this driver callback back as well, so it should work identically to how it was originally. Now if this function really is doing what it should be doing, well, that's a different story, but we are at least doing the identical thing that we were before... Cc: Johan Hovold <jhovold@gmail.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15USB: serial: hook up reset_resume callbackGreg Kroah-Hartman
The callback is now hooked up for any USB to serial driver that wants it. We only register the callback if any of the usb-serial structures want it, this keeps the USB core happy. Thanks to Alan Stern for the ideas on how to do this. Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15usb: chipidea: remove zero check of hw_ep_maxRichard Zhao
It's 0 for host only device. Signed-off-by: Richard Zhao <richard.zhao@freescale.com> Cc: Marek Vasut <marex@denx.de> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15USB: CI13xxx: Use usb_put_hcd() on failure to drop HCDMarek Vasut
Use usb_put_hcd() call instead of usb_remove_hcd() as that's the appropriate call to drop hcd which failed registration. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15USB: CI13xxx: Allow use of CONFIG_USB_EHCI_ROOT_HUB_TTMarek Vasut
The CI13xxx usb host needs the root TT support to work properly. Allow selecting this for the CI13xxx too. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-15USB: testusb: add path /dev/bus/usb to default search paths for usbfsDu, ChangbinX
As real device-nodes managed by udev whose nodes lived in /dev/bus/usb are mostly used today, let testusb tool use that directory as one default path make tool be more convenient to use. Signed-off-by: Du Changbin <changbinx.du@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14USB: EHCI: work around bug in the Philips ISP1562 controllerAlan Stern
This patch (as1556) works around a bug in the Philips ISP1562 EHCI controller. Although the controller claims to support frame-list lengths smaller than the default of 1024 for its periodic schedule, in fact smaller values don't work. A new quirk flag is added to indicate when the bug is present, and if it is then the schedule size is left at the default value. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14USB: EHCI: improve full-speed isochronous scheduling routineAlan Stern
This patch (as1555) improves the code ehci-hcd uses while checking the periodic schedule for isochronous transfers to full-speed devices. In addition to making sure that a new transfer does not violate the restrictions on the high-speed schedule, it also has to check the restrictions on the full-speed part of the bus, i.e., the part beyond the Transaction Translator (TT). It does this by calling tt_available() (or tt_no_collision() if CONFIG_USB_EHCI_TT_NEWSCHED isn't enabled). However it calls that routine on each pass through a loop over the frames being modified, which is an unnecessary expense because tt_available() (or tt_no_collision) already does its own loop over frames. It is sufficient to do the check just once, before starting the loop. In addition, the function calls incorrectly converted the transfer's period from microframes to frames by doing a left shift instead of a right shift. The patch fixes this while moving the calls. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14usb: musb: cppi: add missing include to fix compilationReinhard Tartler
This fixes compilation as module. Signed-off-by: Reinhard Tartler <tartler@cs.fau.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14USB: add read support to usb-serial/../new_idBjørn Mork
Keep the usb-serial support for dynamic IDs in sync with the usb support. This enables readout of dynamic device IDs for usb-serial drivers. Common code is exported from the usb core system and reused by the usb-serial bus driver. Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14USB: let both new_id and remove_id show dynamic id listBjørn Mork
This enables the current list of dynamic IDs to be read out through either new_id or remove_id. Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14FunctionFS: enable multiple functionsAndrzej Pietrasiewicz
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Michal Nazarewicz <mina86@mina86.com> Cc: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14Revert "usb: add struct usb_hub_port to store port related members."Greg Kroah-Hartman
This reverts commit f397d7c4c5e8a1eb93f2ed15808a509318ccf1dd. This series isn't quite ready for 3.5 just yet, so revert it and give the author more time to get it correct. Cc: Lan Tianyu <tianyu.lan@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14Revert "usb: move struct usb_device->children to struct usb_hub_port->child"Greg Kroah-Hartman
This reverts commit bebc56d58dc780539777d2b1ca80df5566e2ad87. The call here is fragile and not well thought out, so revert it, it's not fully baked yet and I don't want this to go into 3.5. Cc: Lan Tianyu <tianyu.lan@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14USB: gpio_vbus: avoid consecutive vbus_session calls with the same "is_active"Shinya Kuribayashi
Basically, ->vbus_session() calls should be served when VBUS session starts and ends (it's not whenever transciever drivers detect VBUS _changes_). Otherwise, if UDC gadget drivers don't want for some reason ->vbus_session() calls with the same "is_active" value, either OTG or UDC drivers need to have some protection handlings. Also, on platforms using this 'gpio_vbus' driver, the driver is only allowed to check whether VBUS is applied. There is no kernel-standard way prepared for UDC gadget drivers to do that. With this in mind, gpio_vbus should try to prevent unnecessary consecutive vbus_session calls being served with the same "in_active" value. Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14USB: gpio_vbus: put a missing regulator_put() on errorShinya Kuribayashi
Note that regulator_put() doesn't care about whether ->vbus_draw is valid or not. Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14USB: gpio_vbus: provide an appropriate debounce intervalShinya Kuribayashi
In commit c2344f13b59e007d782a3e591ebc551bc583a8b7 (USB: gpio_vbus: add delayed vbus_session calls, 2009-01-24), usb_gadget_vbus_connect() and ...disconnect() were extracted from the interrupt handler, so to allow vbus_session handlers to deal with msleep() calls. This patch takes the approach one step further. USB2.0 specification (7.1.7.3 Connect and Disconnect Signaling) says that the USB system software (shall) provide a debounce interval with a minimum duration of 100 ms, which ensures that the electrical and mechanical connection is stable before software attempts to reset the attached device. Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14USB: gpio_vbus: fix inconsistent 'dev_id' parameters at free_irq()Shinya Kuribayashi
'dev_id' has to be the same with the one passed to request_irq(). Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14usb: Kconfig: remove unneeded default valueDavid Herrmann
If no default value is specified, then 'n' is used so the default value used here is not needed. Furthermore, we should never change default values depending on EXPERT mode. EXPERT mode should only make options visible, not change them. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14USB: ohci-omap: Use usb_put_transceiver instead of put_deviceJarkko Nikula
Currently usb_put_transceiver calls put_device so this is a no-op but it is better to keep API usage consistent as ohci->transceiver is allocated with usb_get_transceiver. While at there remove one extra ohci->transceiver test as the code block has already tested it. Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-14USB: ehci-fsl: Use usb_put_transceiver instead of put_deviceJarkko Nikula
Currently usb_put_transceiver calls put_device so this is a no-op but it is better to keep API usage consistent as ehci->transceiver is allocated with usb_get_transceiver. While at there remove one extra ehci->transceiver test as the code block has already tested it. Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11usb: move struct usb_device->children to struct usb_hub_port->childLan Tianyu
Move child's pointer to the struct usb_hub_port since the child device is directly associated with the port. Provide usb_get_hub_child_device() to get child's pointer. Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11usb: add struct usb_hub_port to store port related members.Lan Tianyu
Add struct usb_hub_port pointer port_data in the struct usb_hub and allocate struct usb_hub_port perspectively for each ports to store private data. Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11usb: Set device removable state based on ACPI USB dataMatthew Garrett
ACPI offers two methods that allow us to infer whether or not a USB port is removable. The _PLD method gives us information on whether the port is "user visible" or not. If that's not present then we can fall back to the _UPC method which tells us whether or not a port is connectable. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11usb: Bind devices to ACPI devices when possibleMatthew Garrett
Built-in USB devices will typically have a representation in the system ACPI tables. Add support for binding the two together so the USB code can make use of the associated methods. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11ACPI: Add _PLD supportMatthew Garrett
Add a simple helper function to allow drivers to obtain the physical device location data. Acked-by: Len Brown <len.brown@intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11ACPI: Add stubs for (un)register_acpi_bus_typeMatthew Garrett
It's unreasonable to have CONFIG_ACPI for these in drivers, so add some stub functions. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11MAINTAINERS: Add an entry for ChipIdea USB driverAlexander Shishkin
Now that the ChipIdea driver and related platform code has its own location in the kernel and more contributions from the interested parties are anticipated, add a new maintainer for it. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11usb: gadget: remove langwell_udcAlexander Shishkin
We have the chipidea driver now that supports both langwell and penwell, so there is no need for this one any more. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11usb: chipidea: drop unused field "device" from ci13xxx_epAlexander Shishkin
It was used as a shorthand for gadget's device in request mapping/unmapping code, but now it's not used any more. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11usb: chipidea: use generic map/unmap routinesAlexander Shishkin
We're one of the remaining drivers to map/unmap requests by hand. Switch to using generic gadget routines for that instead. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11usb: chipidea: add power_budget limit for ehci to platform dataAlexander Shishkin
Some implementations need this limitation to work correctly. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11usb: chipidea: add host roleAlexander Shishkin
This adds EHCI host support to the chipidea driver. We want it to be part of the hdrc driver and not a standalone (sub-)driver module, as the structure of ehci-hcd.c suggests, so for chipidea controller we hack it to not provide platform-related code, but only the ehci hcd. The ehci-platform driver won't work for us here too, because the controller uses the same registers for both device and host mode and also otg-related bits, so it's not really possible to put ehci registers into a separate resource. This is not a pretty solution, but the alternative is exporting symbols from the chipidea driver to a ehci-chipidea driver and doing all the module refcounting. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11usb: chipidea: use common definition for USBMODE bitsAlexander Shishkin
Some of the bits of USBMODE register are defined in <usb/ehci_def.h>, use them instead of having our own definitions. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11usb: chipidea: drop unused msm register definitionsAlexander Shishkin
These definitions are unused, and the same registers are also defined in <linux/usb/msm_hsusb_hw.h>. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11usb: chipidea: drop redundant NULL checkAlexander Shishkin
Currently, gadget can't be NULL in _gadget_stop_activity(). Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Reported-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11usb: chipidea: isr_reset_handler fix missing lockingMichael Grzeschik
Move spin_lock under the done label, so the lock will also be pulled in the error paths. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> [rebased on top of the patchset] Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11usb: chipidea: brush up structure definitionsAlexander Shishkin
Get rid of trailing comments in the structure definitions in favor of kernel-doc. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11usb: chipidea: remove unused field "regs" from ci13xxxAlexander Shishkin
The old implementation used global hw_bank, the new implementation uses udc-local hw_bank. This field seems to be a leftover from previous coding experiments. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11usb: chipidea: add support for rolesAlexander Shishkin
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 <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11usb: chipidea: split the driver code into unitsAlexander Shishkin
Split the driver into the following parts: * core -- resources, register access, capabilities, etc; * udc -- device controller functionality; * debug -- logging events. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11usb: move ci13xxx and related code to drivers/usb/chipideaAlexander Shishkin
Since chipidea is a dual role controller, it makes sense to move it to its own directory, where we can also have host, otg and platform code related to this controller. It also makes sense to break out the driver into several compilation units like udc, host, debugging code, etc. Firstly, let's move the udc and platform code to drivers/usb/chipidea. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>