summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
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-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>
2012-05-11usb: gadget: ci13xxx: print basic device info when probingAlexander Shishkin
Report basic information about capabilities and register addresses on probe. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11usb: gadget: ci13xxx: don't use "advance" feature when setting addressAlexander Shishkin
Newer versions of the chipidea controller support the "advance" setting of usb address, which means instead of setting it immediately, deferring it till the status completion. Unfortunately, older versions of the controller don't have this feature, so in order to support those too, we simply don't use it. It's about 4 lines of extra code, and isn't in any way critical to performance. While at it, change the return value of the hw_usb_set_address() to void, since it can't fail in any measurable way. With this patch, ci13xxx_udc driver works with the chipidea controller in kirkwood (feroceon SoC), as found in, for example, sheevaplug. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11usb: gadget: ci13xxx: fix the context of register mapAlexander Shishkin
The regmap field is an array of register pointers, not the other way around. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11usb: gadget: ci13xxx: get rid of local tracing for goodAlexander Shishkin
There is no point in having tracing output in the kernel these days. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11usb: gadget: ci13xxx_pci: guard against devices without driver_dataAlexander Shishkin
Don't try to initialize devices that don't have driver_data assigned to their pci ids. Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11USB: cdc-wdm: remove from device list on disconnectBjørn Mork
Prevents dereferencing an invalid struct usb_interface pointer. Always delete entry from device list whether or not the rest of the device state cleanup is postponed. The device list uses desc->intf as key, and wdm_open will dereference this key while searching for a matching device. A device should not appear in the list unless probe() has succeeded and disconnect() has not finished. Cc: Oliver Neukum <oliver@neukum.org> Cc: stable <stable@vger.kernel.org> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11USB: cdc-wdm: cannot use dev_printk when device is goneBjørn Mork
We cannot dereference a removed USB interface for dev_printk. Use pr_debug instead where necessary. Flush errors are expected if device is unplugged and are therefore best ingored at this point. Move the kill_urbs() call in wdm_release with dev_dbg() for the non disconnect, as we know it has already been called if WDM_DISCONNECTING is set. This does not actually fix anything, but keeps the code more consistent. Cc: Oliver Neukum <oliver@neukum.org> Cc: stable <stable@vger.kernel.org> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11USB: cdc-wdm: poll must return POLLHUP if device is goneBjørn Mork
Else the poll will be restarted indefinitely in a tight loop, preventing final device cleanup. Cc: Oliver Neukum <oliver@neukum.org> Cc: stable <stable@vger.kernel.org> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11usb: dwc3: Fix the dwc3 dependencyjoseph daniel
The warning shown up when ran with randconfig, warning: (USB_DWC3) selects USB_XHCI_PLATFORM which has unmet direct dependencies (USB_SUPPORT && USB_XHCI_HCD) Signed-off-by: joseph daniel <josephdanielwalter@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11usb: gadget: dummy_hcd: fix build when BUG is not setSasha Levin
Use WARN_ON() instead of __WARN, which also means we won't use any internal macros. Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11usb: host: mips: sead3: Fix for big endian.Steven J. Hill
Fix driver to work properly in big endian mode. Signed-off-by: Steven J. Hill <sjhill@mips.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-11USB: serial: ti_usb_3410_5052: Add support for the FRI2 serial consoleDarren Hart
The Kontron M2M development board, also known as the Fish River Island II, has an optional daughter card providing access to the PCH_UART (EG20T) via a ti_usb_3410_5052 uart to usb chip. http://us.kontron.com/products/systems+and+platforms/m2m/m2m+smart+services+developer+kit.html Signed-off-by: Darren Hart <dvhart@linux.intel.com> CC: Al Borchers <alborchers@steinerpoint.com> CC: Peter Berger <pberger@brimson.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-10USB: serial: opticon: hook up suspend/resume callbacksGreg Kroah-Hartman
With a previous patch, the usb_driver suspend/resume callbacks got overridden and were never called if a usb_serial driver defined them. This patch fixes the opticon driver to move the suspend/resume callbacks into the usb_serial_driver structure where they will be properly called. It then removes the unused usb_driver structure. Cc: Johan Hovold <jhovold@gmail.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Cc: Julia Lawall <julia@diku.dk> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-10USB: serqt_usb2: remove duplicate device idsGreg Kroah-Hartman
There are a number of device ids that the quatech2 driver supports that are duplicated in the serqt_usb2 driver, so remove them from the serqt_usb2 driver as they do not belong there. Reported-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-10USB: remove staging quatech_usb2 driverGreg Kroah-Hartman
Now that we have a "real" driver for the quatech devices, we can remove the drivers/staging/quatech_usb2/ driver as it is no longer needed. Thanks to Bill Pemberton for writing the new driver. Cc: Richard Ash <richard@audacityteam.org> Cc: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-10USB: serial: add copyright and license to quatech2Bill Pemberton
Add a copyright and license statement to the head of quatech.c source file. No code change here. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-10USB: serial: add quatech2 usb to serial driverBill Pemberton
This supports the Quatech USB 2 usb to serial adapters. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-10usb: gadget: f_rndis: Set rndis vendor parametersBenoit Goby
Add a variant of rndis_bind_config to let gadget drivers change rndis vendorID and manufacturer parameters. Signed-off-by: Benoit Goby <benoit@android.com> [make rndis_bind_config a static inline function] 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-10usb: gadget: rndis: Fix re-binding f_rndisBenoit Goby
f_rndis checks if rndis_string_defs[0].id is null to setup rndis and allocate string ids when it is bound to the first configuration: /* maybe allocate device-global string IDs */ if (rndis_string_defs[0].id == 0) { /* ... and setup RNDIS itself */ status = rndis_init(); if (status < 0) return status; rndis_string_defs[0].id must be reset to 0 on unbind for rndis to be correctly initialized on the next composite_bind. Signed-off-by: Benoit Goby <benoit@android.com> 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>