forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (122 commits) USB: mos7840: add device IDs for B&B electronics devices USB: ftdi_sio: add USB device ID's for B&B Electronics line USB: musb: musb_host: fix sparse warning USB: musb: musb_gadget: fix sparse warning USB: musb: omap2430: fix sparse warning USB: core: message: fix sparse warning USB: core: hub: fix sparse warning USB: core: fix sparse warning for static function USB: Added USB_ETH_RNDIS to use instead of CONFIG_USB_ETH_RNDIS USB: Check bandwidth when switching alt settings. USB: Refactor code to find alternate interface settings. USB: xhci: Fix command completion after a drop endpoint. USB: xhci: Make reverting an alt setting "unfailable". USB: usbtmc: Use usb_clear_halt() instead of custom code. USB: xhci: Add correct email and files to MAINTAINERS entry. USB: ehci-omap.c: introduce missing kfree USB: xhci-mem.c: introduce missing kfree USB: add remove_id sysfs attr for usb drivers USB: g_multi kconfig: fix depends and help text USB: option: add pid for ZTE ...
- Loading branch information
Showing
106 changed files
with
9,634 additions
and
1,881 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -144,3 +144,16 @@ Description: | |
|
||
Write a 1 to force the device to disconnect | ||
(equivalent to unplugging a wired USB device). | ||
|
||
What: /sys/bus/usb/drivers/.../remove_id | ||
Date: November 2009 | ||
Contact: CHENG Renquan <[email protected]> | ||
Description: | ||
Writing a device ID to this file will remove an ID | ||
that was dynamically added via the new_id sysfs entry. | ||
The format for the device ID is: | ||
idVendor idProduct. After successfully | ||
removing an ID, the driver will no longer support the | ||
device. This is useful to ensure auto probing won't | ||
match the driver to the device. For example: | ||
# echo "046d c315" > /sys/bus/usb/drivers/foo/remove_id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,3 +23,16 @@ Description: | |
Since this relates to security (specifically, the | ||
lifetime of PTKs and GTKs) it should not be changed | ||
from the default. | ||
|
||
What: /sys/class/uwb_rc/uwbN/wusbhc/wusb_phy_rate | ||
Date: August 2009 | ||
KernelVersion: 2.6.32 | ||
Contact: David Vrabel <[email protected]> | ||
Description: | ||
The maximum PHY rate to use for all connected devices. | ||
This is only of limited use for testing and | ||
development as the hardware's automatic rate | ||
adaptation is better then this simple control. | ||
|
||
Refer to [ECMA-368] section 10.3.1.1 for the value to | ||
use. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
Alan Stern <[email protected]> | ||
|
||
October 5, 2007 | ||
November 10, 2009 | ||
|
||
|
||
|
||
|
@@ -123,9 +123,9 @@ relevant attribute files are: wakeup, level, and autosuspend. | |
|
||
power/level | ||
|
||
This file contains one of three words: "on", "auto", | ||
or "suspend". You can write those words to the file | ||
to change the device's setting. | ||
This file contains one of two words: "on" or "auto". | ||
You can write those words to the file to change the | ||
device's setting. | ||
|
||
"on" means that the device should be resumed and | ||
autosuspend is not allowed. (Of course, system | ||
|
@@ -134,10 +134,10 @@ relevant attribute files are: wakeup, level, and autosuspend. | |
"auto" is the normal state in which the kernel is | ||
allowed to autosuspend and autoresume the device. | ||
|
||
"suspend" means that the device should remain | ||
suspended, and autoresume is not allowed. (But remote | ||
wakeup may still be allowed, since it is controlled | ||
separately by the power/wakeup attribute.) | ||
(In kernels up to 2.6.32, you could also specify | ||
"suspend", meaning that the device should remain | ||
suspended and autoresume was not allowed. This | ||
setting is no longer supported.) | ||
|
||
power/autosuspend | ||
|
||
|
@@ -313,13 +313,14 @@ three of the methods listed above. In addition, a driver indicates | |
that it supports autosuspend by setting the .supports_autosuspend flag | ||
in its usb_driver structure. It is then responsible for informing the | ||
USB core whenever one of its interfaces becomes busy or idle. The | ||
driver does so by calling these five functions: | ||
driver does so by calling these six functions: | ||
|
||
int usb_autopm_get_interface(struct usb_interface *intf); | ||
void usb_autopm_put_interface(struct usb_interface *intf); | ||
int usb_autopm_set_interface(struct usb_interface *intf); | ||
int usb_autopm_get_interface_async(struct usb_interface *intf); | ||
void usb_autopm_put_interface_async(struct usb_interface *intf); | ||
void usb_autopm_get_interface_no_resume(struct usb_interface *intf); | ||
void usb_autopm_put_interface_no_suspend(struct usb_interface *intf); | ||
|
||
The functions work by maintaining a counter in the usb_interface | ||
structure. When intf->pm_usage_count is > 0 then the interface is | ||
|
@@ -331,11 +332,13 @@ considered to be idle, and the kernel may autosuspend the device. | |
associated with the device itself rather than any of its interfaces. | ||
This field is used only by the USB core.) | ||
|
||
The driver owns intf->pm_usage_count; it can modify the value however | ||
and whenever it likes. A nice aspect of the non-async usb_autopm_* | ||
routines is that the changes they make are protected by the usb_device | ||
structure's PM mutex (udev->pm_mutex); however drivers may change | ||
pm_usage_count without holding the mutex. Drivers using the async | ||
Drivers must not modify intf->pm_usage_count directly; its value | ||
should be changed only be using the functions listed above. Drivers | ||
are responsible for insuring that the overall change to pm_usage_count | ||
during their lifetime balances out to 0 (it may be necessary for the | ||
disconnect method to call usb_autopm_put_interface() one or more times | ||
to fulfill this requirement). The first two routines use the PM mutex | ||
in struct usb_device for mutual exclusion; drivers using the async | ||
routines are responsible for their own synchronization and mutual | ||
exclusion. | ||
|
||
|
@@ -347,11 +350,6 @@ exclusion. | |
attempts an autosuspend if the new value is <= 0 and the | ||
device isn't suspended. | ||
|
||
usb_autopm_set_interface() leaves pm_usage_count alone. | ||
It attempts an autoresume if the value is > 0 and the device | ||
is suspended, and it attempts an autosuspend if the value is | ||
<= 0 and the device isn't suspended. | ||
|
||
usb_autopm_get_interface_async() and | ||
usb_autopm_put_interface_async() do almost the same things as | ||
their non-async counterparts. The differences are: they do | ||
|
@@ -360,13 +358,11 @@ exclusion. | |
such as an URB's completion handler, but when they return the | ||
device will not generally not yet be in the desired state. | ||
|
||
There also are a couple of utility routines drivers can use: | ||
|
||
usb_autopm_enable() sets pm_usage_cnt to 0 and then calls | ||
usb_autopm_set_interface(), which will attempt an autosuspend. | ||
|
||
usb_autopm_disable() sets pm_usage_cnt to 1 and then calls | ||
usb_autopm_set_interface(), which will attempt an autoresume. | ||
usb_autopm_get_interface_no_resume() and | ||
usb_autopm_put_interface_no_suspend() merely increment or | ||
decrement the pm_usage_count value; they do not attempt to | ||
carry out an autoresume or an autosuspend. Hence they can be | ||
called in an atomic context. | ||
|
||
The conventional usage pattern is that a driver calls | ||
usb_autopm_get_interface() in its open routine and | ||
|
@@ -400,11 +396,11 @@ though, setting this flag won't cause the kernel to autoresume it. | |
Normally a driver would set this flag in its probe method, at which | ||
time the device is guaranteed not to be autosuspended.) | ||
|
||
The usb_autopm_* routines have to run in a sleepable process context; | ||
they must not be called from an interrupt handler or while holding a | ||
spinlock. In fact, the entire autosuspend mechanism is not well geared | ||
toward interrupt-driven operation. However there is one thing a | ||
driver can do in an interrupt handler: | ||
The synchronous usb_autopm_* routines have to run in a sleepable | ||
process context; they must not be called from an interrupt handler or | ||
while holding a spinlock. In fact, the entire autosuspend mechanism | ||
is not well geared toward interrupt-driven operation. However there | ||
is one thing a driver can do in an interrupt handler: | ||
|
||
usb_mark_last_busy(struct usb_device *udev); | ||
|
||
|
@@ -423,15 +419,16 @@ an URB had completed too recently. | |
|
||
External suspend calls should never be allowed to fail in this way, | ||
only autosuspend calls. The driver can tell them apart by checking | ||
udev->auto_pm; this flag will be set to 1 for internal PM events | ||
(autosuspend or autoresume) and 0 for external PM events. | ||
the PM_EVENT_AUTO bit in the message.event argument to the suspend | ||
method; this bit will be set for internal PM events (autosuspend) and | ||
clear for external PM events. | ||
|
||
Many of the ingredients in the autosuspend framework are oriented | ||
towards interfaces: The usb_interface structure contains the | ||
pm_usage_cnt field, and the usb_autopm_* routines take an interface | ||
pointer as their argument. But somewhat confusingly, a few of the | ||
pieces (usb_mark_last_busy() and udev->auto_pm) use the usb_device | ||
structure instead. Drivers need to keep this straight; they can call | ||
pieces (i.e., usb_mark_last_busy()) use the usb_device structure | ||
instead. Drivers need to keep this straight; they can call | ||
interface_to_usbdev() to find the device structure for a given | ||
interface. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5680,9 +5680,11 @@ S: Maintained | |
F: drivers/net/wireless/rndis_wlan.c | ||
|
||
USB XHCI DRIVER | ||
M: Sarah Sharp <[email protected]> | ||
M: Sarah Sharp <sarah.a.sharp@linux.intel.com> | ||
L: [email protected] | ||
S: Supported | ||
F: drivers/usb/host/xhci* | ||
F: drivers/usb/host/pci-quirks* | ||
|
||
USB ZC0301 DRIVER | ||
M: Luca Risolia <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
/* | ||
* Copyright (c) 2009 Daniel Mack <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License as published by the | ||
* Free Software Foundation; either version 2 of the License, or (at your | ||
* option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, but | ||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
* for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software Foundation, | ||
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
*/ | ||
|
||
#include <linux/platform_device.h> | ||
#include <linux/io.h> | ||
|
||
#include <mach/hardware.h> | ||
#include <mach/mxc_ehci.h> | ||
|
||
#define USBCTRL_OTGBASE_OFFSET 0x600 | ||
|
||
#define MX31_OTG_SIC_SHIFT 29 | ||
#define MX31_OTG_SIC_MASK (0xf << MX31_OTG_SIC_SHIFT) | ||
#define MX31_OTG_PM_BIT (1 << 24) | ||
|
||
#define MX31_H2_SIC_SHIFT 21 | ||
#define MX31_H2_SIC_MASK (0xf << MX31_H2_SIC_SHIFT) | ||
#define MX31_H2_PM_BIT (1 << 16) | ||
#define MX31_H2_DT_BIT (1 << 5) | ||
|
||
#define MX31_H1_SIC_SHIFT 13 | ||
#define MX31_H1_SIC_MASK (0xf << MX31_H1_SIC_SHIFT) | ||
#define MX31_H1_PM_BIT (1 << 8) | ||
#define MX31_H1_DT_BIT (1 << 4) | ||
|
||
int mxc_set_usbcontrol(int port, unsigned int flags) | ||
{ | ||
unsigned int v; | ||
|
||
if (cpu_is_mx31()) { | ||
v = readl(IO_ADDRESS(MX31_OTG_BASE_ADDR + | ||
USBCTRL_OTGBASE_OFFSET)); | ||
|
||
switch (port) { | ||
case 0: /* OTG port */ | ||
v &= ~(MX31_OTG_SIC_MASK | MX31_OTG_PM_BIT); | ||
v |= (flags & MXC_EHCI_INTERFACE_MASK) | ||
<< MX31_OTG_SIC_SHIFT; | ||
if (flags & MXC_EHCI_POWER_PINS_ENABLED) | ||
v |= MX31_OTG_PM_BIT; | ||
|
||
break; | ||
case 1: /* H1 port */ | ||
v &= ~(MX31_H1_SIC_MASK | MX31_H1_PM_BIT); | ||
v |= (flags & MXC_EHCI_INTERFACE_MASK) | ||
<< MX31_H1_SIC_SHIFT; | ||
if (flags & MXC_EHCI_POWER_PINS_ENABLED) | ||
v |= MX31_H1_PM_BIT; | ||
|
||
if (!(flags & MXC_EHCI_TTL_ENABLED)) | ||
v |= MX31_H1_DT_BIT; | ||
|
||
break; | ||
case 2: /* H2 port */ | ||
v &= ~(MX31_H2_SIC_MASK | MX31_H2_PM_BIT); | ||
v |= (flags & MXC_EHCI_INTERFACE_MASK) | ||
<< MX31_H2_SIC_SHIFT; | ||
if (!(flags & MXC_EHCI_POWER_PINS_ENABLED)) | ||
v |= MX31_H2_PM_BIT; | ||
|
||
if (!(flags & MXC_EHCI_TTL_ENABLED)) | ||
v |= MX31_H2_DT_BIT; | ||
|
||
break; | ||
} | ||
|
||
writel(v, IO_ADDRESS(MX31_OTG_BASE_ADDR + | ||
USBCTRL_OTGBASE_OFFSET)); | ||
return 0; | ||
} | ||
|
||
printk(KERN_WARNING | ||
"%s() unable to setup USBCONTROL for this CPU\n", __func__); | ||
return -EINVAL; | ||
} | ||
EXPORT_SYMBOL(mxc_set_usbcontrol); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#ifndef __INCLUDE_ASM_ARCH_MXC_EHCI_H | ||
#define __INCLUDE_ASM_ARCH_MXC_EHCI_H | ||
|
||
/* values for portsc field */ | ||
#define MXC_EHCI_PHY_LOW_POWER_SUSPEND (1 << 23) | ||
#define MXC_EHCI_FORCE_FS (1 << 24) | ||
#define MXC_EHCI_UTMI_8BIT (0 << 28) | ||
#define MXC_EHCI_UTMI_16BIT (1 << 28) | ||
#define MXC_EHCI_SERIAL (1 << 29) | ||
#define MXC_EHCI_MODE_UTMI (0 << 30) | ||
#define MXC_EHCI_MODE_PHILIPS (1 << 30) | ||
#define MXC_EHCI_MODE_ULPI (2 << 30) | ||
#define MXC_EHCI_MODE_SERIAL (3 << 30) | ||
|
||
/* values for flags field */ | ||
#define MXC_EHCI_INTERFACE_DIFF_UNI (0 << 0) | ||
#define MXC_EHCI_INTERFACE_DIFF_BI (1 << 0) | ||
#define MXC_EHCI_INTERFACE_SINGLE_UNI (2 << 0) | ||
#define MXC_EHCI_INTERFACE_SINGLE_BI (3 << 0) | ||
#define MXC_EHCI_INTERFACE_MASK (0xf) | ||
|
||
#define MXC_EHCI_POWER_PINS_ENABLED (1 << 5) | ||
#define MXC_EHCI_TTL_ENABLED (1 << 6) | ||
|
||
struct mxc_usbh_platform_data { | ||
int (*init)(struct platform_device *pdev); | ||
int (*exit)(struct platform_device *pdev); | ||
|
||
unsigned int portsc; | ||
unsigned int flags; | ||
struct otg_transceiver *otg; | ||
}; | ||
|
||
int mxc_set_usbcontrol(int port, unsigned int flags); | ||
|
||
#endif /* __INCLUDE_ASM_ARCH_MXC_EHCI_H */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.