platform/kernel/kernel-mfld-blackbay.git
13 years agoDA8xx: assign name to MUSB IRQ resource
Sergei Shtylyov [Fri, 10 Dec 2010 17:23:06 +0000 (20:23 +0300)]
DA8xx: assign name to MUSB IRQ resource

Commit fcf173e4511193b1efeccb0f22a8c641b464353b (usb: musb: add names for IRQs
in structure resource) forgot to assign name to the DA8xx MUSB IRQ resource.
Because of that MUSB driver fails to load on DA8xx machines.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agoarm: OMAP4430: musb: Configure musb to OTG mode
Hema HK [Fri, 10 Dec 2010 12:41:42 +0000 (18:11 +0530)]
arm: OMAP4430: musb: Configure musb to OTG mode

Enabling the musb OTG mode for SDP and PANDA boards.

Signed-off-by: Hema HK <hemahk@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: musb: Adding musb support for OMAP4430
Hema HK [Fri, 10 Dec 2010 12:40:51 +0000 (18:10 +0530)]
usb: musb: Adding musb support for OMAP4430

OMAP4430 supports UTMI and ULPI types of transceiver interface.

In UTMI mode: The PHY is embedded within OMAP4430. The transceiver functionality
is split between the twl6030 PMIC chip and OMAP4430. The VBUS, ID pin
sensing and OTG SRP generation part is integrated in TWL6030 and UTMI PHY
functionality is embedded within the OMAP4430.

There is no direct interactions between the MUSB controller and TWL6030
chip to communicate the session-valid, session-end and ID-GND events.
It has to be done through a software by setting/resetting bits in
one of the control module register of OMAP4430 which in turn toggles
the appropriate signals to MUSB controller.

musb driver is register for blocking notifications from the transceiver
driver to get the event notifications for connect/disconnect and ID-GND.
Based on these events call the transceiver init/shutdown function to
configure the transceiver to toggle the VBUS valid, session end and ID_GND
signals to musb and power on/off the internal PHY.

For ID_GND event notifications, toggle the ID_GND signal and then wait for
musb to be configured as "A" device, and then call the transceiver function
to set the VBUS.

In OTG mode and musb as a host, When the Micro A connector used, VBUS is turned on
and session bit set. When the device is connected, enumeration goes through.
When the device disconnected from the other end of the connector(ID is still grounded),
link will detect the disconnect and end the session. When the device is connected back,
there are no events generated in the TWL6030-usb, and link is already down.
So the device is not detected. Removed the session bit disable code which
will recognize the connect of the device.

Limitation: In OTG host mode, if device is connected during boot, it does not get
detected. If disconnect and connect it back or connect after boot only it works.
Fix for this, I will submit seperate patch later.

Signed-off-by: Hema HK <hemahk@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: otg: TWL6030: Add twl6030_usb file for compilation
Hema HK [Fri, 10 Dec 2010 12:40:37 +0000 (18:10 +0530)]
usb: otg: TWL6030: Add twl6030_usb file for compilation

Add the twl6030_usb transceiver file for compilation.

Signed-off-by: Hema HK <hemahk@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agomfd: TWL6030: OMAP4: Registering the TWL6030-usb device
Hema HK [Fri, 10 Dec 2010 12:39:52 +0000 (18:09 +0530)]
mfd: TWL6030: OMAP4: Registering the TWL6030-usb device

Registering the twl6030-usb transceiver device as a child to twl6030 core.
Removed the NOP transceiver init call from board file.

Populated twl4030_usb_data platform data structure with the function
pointers for OMAP4430 internal PHY operation to be used by twl630-usb driver.

Signed-off-by: Hema HK <hemahk@ti.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: musb: TWL6030: Selecting TWL6030_USB transceiver
Hema HK [Fri, 10 Dec 2010 12:39:35 +0000 (18:09 +0530)]
usb: musb: TWL6030: Selecting TWL6030_USB transceiver

Selecting the twl6030-usb for OMAP4430SDP and OMAP4PANDA boards and
adding OMAP4 internal phy code for compilation

Signed-off-by: Hema HK <hemahk@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: otg: Kconfig: Add Kconfig option for TWL6030 transceiver.
Hema HK [Fri, 10 Dec 2010 12:38:48 +0000 (18:08 +0530)]
usb: otg: Kconfig: Add Kconfig option for TWL6030 transceiver.

Added the TWL6030-usb transceiver option in the Kconfig

Signed-off-by: Hema HK <hemahk@ti.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: otg: Adding twl6030-usb transceiver driver for OMAP4430
Hema HK [Fri, 10 Dec 2010 12:28:20 +0000 (17:58 +0530)]
usb: otg: Adding twl6030-usb transceiver driver for OMAP4430

Adding the twl6030-usb transceiver support for OMAP4 musb driver.

OMAP4 supports 2 types of transceiver interface.

1. UTMI: The PHY is embedded within OMAP4. The transceiver functionality
is split between the twl6030 PMIC chip and OMAP4430. The VBUS, ID pin
sensing and OTG SRP generation part is integrated in TWL6030 and UTMI PHY
functionality is embedded within the OMAP4430.

There is no direct interactions between the MUSB controller and TWL6030
chip to communicate the session-valid, session-end and ID-GND events.
It has to be done through a software by setting/resetting bits in
one of the control module register of OMAP4430 which in turn toggles
the appropriate signals to MUSB controller.

The internal transceiver has functional clocks and
powerdown bits to powerdown the PHY for power saving.

Since there is no option available for having 2 transceiver drivers
for one USB controller, internal PHY specific APIs are passed through
plaform_data function pointers to use in the twl6030-usb transceiver
driver.

2. ULPI interface is provided for off-chip transceivers.

Signed-off-by: Hema HK <hemahk@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agomfd: TWL6030: USBOTG VBUS event generation on
Hema HK [Fri, 10 Dec 2010 12:25:37 +0000 (17:55 +0530)]
mfd: TWL6030: USBOTG VBUS event generation on

With TWL6030-usb, VBUS SESS_VLD and SESS_END events are not generated
as expected. When these interrupts are enabled, charger VBUS detection
interrupt does not get generated. So USBOTG has to be dependent on charger
VBUS interrupts.
So added one bit for USBOTG and changed the handler to call the
USBOTG handler whenever there is a charger VBUS interrpt.

VBUS SESS_VLD and SESS_END event generation issue is under debug with
HW team. This fix might not be required once after fixing the issue.

Signed-off-by: Balaji TK <balajitk@ti.com>
Signed-off-by: Hema HK <hemahk@ti.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: musb: add support for ux500 platform
Mian Yousaf Kaukab [Thu, 9 Dec 2010 12:05:01 +0000 (13:05 +0100)]
usb: musb: add support for ux500 platform

Initial support for u8500 and u5500 platform.

Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agomusb: am35x: fix compile error due to control apis
Ajay Kumar Gupta [Tue, 7 Dec 2010 13:27:45 +0000 (18:57 +0530)]
musb: am35x: fix compile error due to control apis

commit 4814ced5116e3b73dc4f63eec84999739fc8ed11 (OMAP:
control: move plat-omap/control.h to mach-omap2/control.h)
moved <plat/control.h> to another location, preventing
drivers from accessing it, so we need to pass function
pointers from arch code to be able to talk to internal
PHY on AM35x.

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agoarm: omap4: enable usb on 4430sdp
Felipe Balbi [Tue, 7 Dec 2010 07:57:59 +0000 (09:57 +0200)]
arm: omap4: enable usb on 4430sdp

Let musb work on 4430sdp as well. We can now
test any problems with multi-omap builds.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: musb: drop board_set_vbus
Felipe Balbi [Thu, 2 Dec 2010 12:30:06 +0000 (14:30 +0200)]
usb: musb: drop board_set_vbus

that's not used anymore. So let's drop it.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: musb: drop musb_platform_suspend/resume
Felipe Balbi [Thu, 2 Dec 2010 11:17:53 +0000 (13:17 +0200)]
usb: musb: drop musb_platform_suspend/resume

all glue layers are now fully moved to the
new setup. We are now using dev_pm_ops to
implement suspend/resume functionality and
thus, musb_platform_suspend/resume has become
deprecated and useless.

This patch drops those function pointers and
its uses.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: musb: blackfin: usb dev_pm_ops structure
Felipe Balbi [Thu, 2 Dec 2010 11:13:09 +0000 (13:13 +0200)]
usb: musb: blackfin: usb dev_pm_ops structure

instead of using musb_platform_suspend_resume,
we can use dev_pm_ops and let platform_device
core handle when to call musb_core's suspend and
glue layer's suspend.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: musb: am35x: usb dev_pm_ops structure
Felipe Balbi [Thu, 2 Dec 2010 10:53:22 +0000 (12:53 +0200)]
usb: musb: am35x: usb dev_pm_ops structure

instead of using musb_platform_suspend_resume,
we can use dev_pm_ops and let platform_device
core handle when to call musb_core's suspend and
glue layer's suspend.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: musb: omap2430: use dev_pm_ops structure
Felipe Balbi [Thu, 2 Dec 2010 10:44:40 +0000 (12:44 +0200)]
usb: musb: omap2430: use dev_pm_ops structure

instead of using musb_platform_suspend/resume,
we can use dev_pm_ops and let the platform_device
core handle when to call musb_core's suspend and
glue layer's suspend.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: musb: omap2430: drop the nops
Felipe Balbi [Thu, 2 Dec 2010 10:35:59 +0000 (12:35 +0200)]
usb: musb: omap2430: drop the nops

we don't need those nops, so drop them.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: musb: mark musb_save/restore_context static
Felipe Balbi [Thu, 2 Dec 2010 10:28:39 +0000 (12:28 +0200)]
usb: musb: mark musb_save/restore_context static

those aren't used outside musb_core.c, so mark
them as static.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: musb: drop musb_platform_save/restore_context
Felipe Balbi [Thu, 2 Dec 2010 10:27:35 +0000 (12:27 +0200)]
usb: musb: drop musb_platform_save/restore_context

... that can be easily folded into the
musb_platform_suspend/resume calls.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: musb: drop the set_clock magic
Felipe Balbi [Thu, 2 Dec 2010 08:55:29 +0000 (10:55 +0200)]
usb: musb: drop the set_clock magic

now that platform glue layer handles
clock completely, that function is completely
useless for us. Drop it.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: musb: move clock handling to glue layer
Felipe Balbi [Thu, 2 Dec 2010 07:57:08 +0000 (09:57 +0200)]
usb: musb: move clock handling to glue layer

musb core doesn't need to know about platform
specific details. So start moving clock
handling to platform glue layer and make
musb core agnostic about that.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: musb: mark ->set_clock deprecated
Felipe Balbi [Thu, 2 Dec 2010 07:51:00 +0000 (09:51 +0200)]
usb: musb: mark ->set_clock deprecated

... we will completely drop that need by
moving clock handling to platform glue
layer. Marking as deprecated will allow
us to catch all users easily.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: musb: pass platform_ops via platform_data
Felipe Balbi [Thu, 2 Dec 2010 07:48:58 +0000 (09:48 +0200)]
usb: musb: pass platform_ops via platform_data

... then we don't need to export any symbols
from glue layer to musb_core.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: musb: blackfin: give it a context structure
Felipe Balbi [Thu, 2 Dec 2010 07:42:50 +0000 (09:42 +0200)]
usb: musb: blackfin: give it a context structure

that structure currently only holds a device
pointer to our own platform_device and musb's
platform_device, but soon it will hold pointers
to our clock structures and glue-specific bits
and pieces.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: musb: da8xx: give it a context structure
Felipe Balbi [Thu, 2 Dec 2010 07:40:34 +0000 (09:40 +0200)]
usb: musb: da8xx: give it a context structure

that structure currently only holds a device
pointer to our own platform_device and musb's
platform_device, but soon it will hold pointers
to our clock structures and glue-specific bits
and pieces.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: musb: davinci: give it a context structure
Felipe Balbi [Thu, 2 Dec 2010 07:38:12 +0000 (09:38 +0200)]
usb: musb: davinci: give it a context structure

that structure currently only holds a device
pointer to our own platform_device and musb's
platform_device, but soon it will hold pointers
to our clock structures and glue-specific bits
and pieces.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: musb: tusb6010: give it a context structure
Felipe Balbi [Thu, 2 Dec 2010 07:35:58 +0000 (09:35 +0200)]
usb: musb: tusb6010: give it a context structure

that structure currently only holds a device
pointer to our own platform_device and musb's
platform_device, but soon it will hold pointers
to our clock structures and glue-specific bits
and pieces.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: musb: am35x: give it a context structure
Felipe Balbi [Thu, 2 Dec 2010 07:33:24 +0000 (09:33 +0200)]
usb: musb: am35x: give it a context structure

that structure currently only holds a device
pointer to our own platform_device and musb's
platform_device, but soon it will hold pointers
to our clock structures and glue-specific bits
and pieces.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: musb: omap2430: give it a context structure
Felipe Balbi [Thu, 2 Dec 2010 07:27:29 +0000 (09:27 +0200)]
usb: musb: omap2430: give it a context structure

that structure currently only holds a device
pointer to our own platform_device and musb's
platform_device, but soon it will hold pointers
to our clock structures and glue-specific bits
and pieces.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: musb: split blackfin to its own platform_driver
Felipe Balbi [Thu, 2 Dec 2010 07:21:05 +0000 (09:21 +0200)]
usb: musb: split blackfin to its own platform_driver

Just adding its own platform_driver, not really
using it yet.

Later patches will come to split power management
code from musb_core and move it completely to HW
glue layer.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: musb: split da8xx to its own platform_driver
Felipe Balbi [Thu, 2 Dec 2010 07:19:35 +0000 (09:19 +0200)]
usb: musb: split da8xx to its own platform_driver

Just adding its own platform_driver, not really
using it yet.

When all HW glue layers are converted, more patches
will come to split power management code from musb_core
and move it completely to HW glue layer.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: musb: split davinci to its own platform_driver
Felipe Balbi [Thu, 2 Dec 2010 07:16:55 +0000 (09:16 +0200)]
usb: musb: split davinci to its own platform_driver

Just adding its own platform_driver, not really
using it yet.

When all HW glue layers are converted, more patches
will come to split power management code from musb_core
and move it completely to HW glue layer.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: musb: split tusb6010 to its own platform_driver
Felipe Balbi [Thu, 2 Dec 2010 07:13:54 +0000 (09:13 +0200)]
usb: musb: split tusb6010 to its own platform_driver

Just adding its own platform_driver, not really
using it yet.

When all HW glue layers are converted, more patches
will come to split power management code from musb_core
and move it completely to HW glue layer.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: musb: split am35x to its own platform_driver
Felipe Balbi [Thu, 2 Dec 2010 07:06:51 +0000 (09:06 +0200)]
usb: musb: split am35x to its own platform_driver

Just adding its own platform_driver, not really
using it yet.

When all HW glue layers are converted, more patches
will come to split power management code from musb_core
and move it completely to HW glue layer.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: musb: split omap2430 to its own platform_driver
Felipe Balbi [Wed, 1 Dec 2010 13:01:11 +0000 (15:01 +0200)]
usb: musb: split omap2430 to its own platform_driver

Just adding its own platform_driver, not really
using it yet.

When all HW glue layers are converted, more patches
will come to split power management code from musb_core
and move it completely to HW glue layer.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: musb: trivial search and replace patch
Felipe Balbi [Thu, 2 Dec 2010 06:49:26 +0000 (08:49 +0200)]
usb: musb: trivial search and replace patch

change all ocurrences of musb_hdrc to musb-hdrc.

We will call glue layer drivers musb-<glue layer>,
so in order to keep things somewhat standard, let's
change the underscore into a dash.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: musb: add Kconfig options for each glue layer
Felipe Balbi [Wed, 1 Dec 2010 12:23:48 +0000 (14:23 +0200)]
usb: musb: add Kconfig options for each glue layer

This will make things simpler when choosing which
glue layer to compile. It avoids a lot of magic
around the "default" Kconfig option and lets the
user choose what exactly s/he wants to compile.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: musb: hold context on musb structure
Felipe Balbi [Wed, 1 Dec 2010 11:53:27 +0000 (13:53 +0200)]
usb: musb: hold context on musb structure

when we start splitting HW glue layer, it's
gonna make it easier to re-use that structure.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agoarm: omap4: panda: initialize musb
Felipe Balbi [Wed, 1 Dec 2010 11:48:54 +0000 (13:48 +0200)]
arm: omap4: panda: initialize musb

initialize the musb port on pandaboard.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: musb: make all glue layer export struct musb_platform_ops
Felipe Balbi [Wed, 1 Dec 2010 11:22:05 +0000 (13:22 +0200)]
usb: musb: make all glue layer export struct musb_platform_ops

preparing to a big refactor on musb code. We need
to be able to compile in all glue layers (or at
least all ARM-based ones) together and have a
working binary.

While preparing for that, we move every glue
layer to export only one symbol, which is
a struct musb_platform_ops, and make all
other functions static.

Later patches will come to allow for compiling
all glue layers together and have a working
binary.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: musb: introduce struct musb_platform_ops
Felipe Balbi [Thu, 21 Oct 2010 10:56:40 +0000 (13:56 +0300)]
usb: musb: introduce struct musb_platform_ops

This will be passed to musb_core by platform glue
layer in order to make it easier to compile support
for several HW glue layers.

Later patches will come using this structure and
also moving HW glue layers to its own platform
driver; the idea is to be able to handle platform
peculiarities in a manner which doesn't affect one
another.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agoMerge branch 'sh/ehci' of master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2...
Greg Kroah-Hartman [Fri, 3 Dec 2010 20:12:29 +0000 (12:12 -0800)]
Merge branch 'sh/ehci' of /linux/kernel/git/lethal/sh-2.6 into work

* 'sh/ehci' of master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6:
  sh: Convert to USB_ARCH_HAS_OHCI/EHCI selects.
  usb: ehci-sh: Add missing ehci helpers.
  usb: ehci-sh: Fix up fault in shutdown path.
  sh: Add EHCI support for SH7786.
  usb: ehci-hcd: Add support for SuperH EHCI.
  usb: ohci-sh: Set IRQ as shared.

13 years agoMerge branch 'for-next' of git://gitorious.org/usb/usb into usb-next
Greg Kroah-Hartman [Fri, 3 Dec 2010 20:10:06 +0000 (12:10 -0800)]
Merge branch 'for-next' of git://gitorious.org/usb/usb into usb-next

* 'for-next' of git://gitorious.org/usb/usb:
  usb: musb: gadget: prevent a NULL pointer dereference
  usb: musb: add names for IRQs in structure resource
  usb: musb: remove board_data parameter from musb_platform_init()

13 years agouwb: fix compiler warning on i1480_est_id_table
Namhyung Kim [Wed, 1 Dec 2010 20:52:22 +0000 (05:52 +0900)]
uwb: fix compiler warning on i1480_est_id_table

Annotate i1480_est_id_table as '__used' to fix following warning:

  CC      drivers/uwb/i1480/i1480-est.o
drivers/uwb/i1480/i1480-est.c:94: warning: â€˜i1480_est_id_table’ defined but not used

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Cc: David Vrabel <david.vrabel@csr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agouwb: fix compiler warning on whcrc_id_table
Namhyung Kim [Wed, 1 Dec 2010 20:52:21 +0000 (05:52 +0900)]
uwb: fix compiler warning on whcrc_id_table

Annotate whcrc_id_table as '__used' to fix following warning:

  CC      drivers/uwb/whc-rc.o
drivers/uwb/whc-rc.c:452: warning: â€˜whcrc_id_table’ defined but not used

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Cc: David Vrabel <david.vrabel@csr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agousb: g_audio: Fix crash at driver removal
Richard Röjfors [Wed, 1 Dec 2010 10:53:00 +0000 (11:53 +0100)]
usb: g_audio: Fix crash at driver removal

If g_audio fails to open the sound control device, it crashes at removal:

Insertion:
[ 4143.836536] g_audio gadget: unable to open sound control device file: /dev/snd/controlC0
[ 4143.836543] g_audio gadget: we need at least one control device
[ 4143.836551] g_audio gadget: Linux USB Audio Gadget, version: Dec 18, 2008
[ 4143.836558] g_audio gadget: g_audio ready

Removal:
[ 4146.802643] BUG: unable to handle kernel paging request at 00023018
[ 4146.802655] IP: [<c10af9f5>] filp_close+0xa/0x5b
[ 4146.802674] *pdpt = 0000000015426001 *pde = 0000000000000000
[ 4146.802684] Oops: 0000 [#1] PREEMPT SMP
[ 4146.802692] last sysfs file: /sys/power/state
[ 4146.802701] Modules linked in: g_audio(-) ioh_udc fuse asix usbnet [last unloaded: g_audio]
[ 4146.802719]
[ 4146.802728] Pid: 1394, comm: rmmod Not tainted 2.6.33.5-26.1-ivi #1 To be filled by O.E.M./To be filled by O.E.M.
[ 4146.802738] EIP: 0060:[<c10af9f5>] EFLAGS: 00010206 CPU: 0
[ 4146.802746] EIP is at filp_close+0xa/0x5b
[ 4146.802753] EAX: 00023000 EBX: 00023000 ECX: 00000046 EDX: df842680
[ 4146.802760] ESI: e071cd4c EDI: df842680 EBP: ddbbbef0 ESP: ddbbbee4
[ 4146.802768]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
[ 4146.802776] Process rmmod (pid: 1394, ti=ddbba000 task=dd95a4f0 task.ti=ddbba000)
[ 4146.802782] Stack:
[ 4146.802787]  d540c280 e071cd4c df2bc000 ddbbbefc e071b82c df11e440 ddbbbf04 e071c622
[ 4146.802804] <0> ddbbbf28 e071c47f 00000008 e071cd74 df11e464 df2bc01c df2bc000 e071ce68
[ 4146.802822] <0> 00000880 ddbbbf38 e07fd1b8 e071cef0 00000000 ddbbbf40 e071b9f4 ddbbbf48
[ 4146.802842] Call Trace:
[ 4146.802857]  [<e071b82c>] ? gaudio_cleanup+0x87/0xe0 [g_audio]
[ 4146.802869]  [<e071c622>] ? audio_unbind+0x8/0xc [g_audio]
[ 4146.802881]  [<e071c47f>] ? composite_unbind+0x8d/0xcb [g_audio]
[ 4146.802895]  [<e07fd1b8>] ? usb_gadget_unregister_driver+0x7b/0xc0 [ioh_udc]
[ 4146.802908]  [<e071b9f4>] ? usb_composite_unregister+0x15/0x17 [g_audio]
[ 4146.802920]  [<e071c633>] ? cleanup+0xd/0xf [g_audio]
[ 4146.802932]  [<c105a938>] ? sys_delete_module+0x185/0x1dd
[ 4146.802944]  [<c101c3ea>] ? do_page_fault+0x248/0x276
[ 4146.802956]  [<c10027d0>] ? sysenter_do_call+0x12/0x26
[ 4146.802962] Code: 12 5f 3a 00 8b 43 04 8b 40 0c 0f b3 30 3b 73 44 73 03 89 73 44 89 f8 e8 f1 61 3a 00 5b 5e 5f 5d c3 55 89 e5 57 89 d7 56 53 89 c3 <8b> 40 18 85 c0 75 0f 68 32 15 5e c1 31 f6 e8 52 39 3a 00 5a eb
[ 4146.803058] EIP: [<c10af9f5>] filp_close+0xa/0x5b SS:ESP 0068:ddbbbee4
[ 4146.803071] CR2: 0000000000023018
[ 4146.803112] ---[ end trace 0989a7e023da0434 ]---

This patch makes sure not to assign the_card if gaudio_open_snd_dev fails,
since the parent function will deallocate the card.

Also make sure all filp's in gaudio_open_snd_dev is assigned NULL upon error
and gaudio_close_snd_dev only cleanups when the filp's are non-NULL.

Signed-off-by: Richard Röjfors <richard.rojfors@pelagicore.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agousb: musb: gadget: prevent a NULL pointer dereference
Felipe Balbi [Wed, 1 Dec 2010 09:03:54 +0000 (11:03 +0200)]
usb: musb: gadget: prevent a NULL pointer dereference

Case we can't allocate struct musb_request,
prevent a NULL pointer dereference by returning
early.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: musb: add names for IRQs in structure resource
Hema Kalliguddi [Wed, 29 Sep 2010 16:26:39 +0000 (11:26 -0500)]
usb: musb: add names for IRQs in structure resource

Soon resource data will get automatically
populated from a set of autogenerated data
from TI's hardware database for the OMAP
platform.

Such database, might not have resources at
the expected order by the current drivers.

While we could hack in some exceptions to
that tool to generate resources in a specific
order, it seems less fragile to use the
resource name instead. That way, no matter
what order the resources are generated, the
driver still work.

Modified the OMAP, Blackfin and Davinci
architecture files to add the name of the IRQs
in the resource structures and musb driver to
use the platform_get_irq_byname() api to get
the device and dma irq numbers instead of using
the index.

Cc: Tony Lindgren <tony@atomide.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Hema HK <hemahk@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: musb: remove board_data parameter from musb_platform_init()
Hema Kalliguddi [Thu, 23 Sep 2010 00:27:40 +0000 (19:27 -0500)]
usb: musb: remove board_data parameter from musb_platform_init()

Removed the board_data parameter being
passed to musb_platform_init function
as board_data can be extracted from
device structure which is already member
of musb structure.

Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Hema HK <hemahk@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agosh: Convert to USB_ARCH_HAS_OHCI/EHCI selects.
Paul Mundt [Wed, 1 Dec 2010 06:58:58 +0000 (15:58 +0900)]
sh: Convert to USB_ARCH_HAS_OHCI/EHCI selects.

This switches over to selects for the subtypes to enable OHCI/EHCI
support explicitly rather than littering the usb Kconfig with subtype
dependencies.

Suggested-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agoMerge branch 'omap4-ehci-for-greg' of git://dev.omapzoom.org/pub/scm/anand/linux...
Greg Kroah-Hartman [Wed, 1 Dec 2010 01:04:33 +0000 (17:04 -0800)]
Merge branch 'omap4-ehci-for-greg' of git://dev.omapzoom.org/anand/linux-omap-usb into usb-next

* 'omap4-ehci-for-greg' of git://dev.omapzoom.org/pub/scm/anand/linux-omap-usb:
  omap4: 4430sdp: enable the ehci port on 4430SDP
  arm: omap4: select USB_ARCH_HAS_EHCI
  arm: omap4: usb: add platform init code for EHCI
  arm: omap4: add USBHOST and related base addresses
  usb: ehci-omap: Add OMAP4 support
  omap: usb: ehci: introduce HSIC mode
  usb: ehci-omap: add helpers for checking port mode
  usb: ehci-omap: use clkdev aliases for functional clocks
  omap: clock: add clkdev aliases for EHCI clocks
  usb: ehci: introduce CONFIG_USB_EHCI_HCD_OMAP
  usb: ehci-omap: don't hard-code TLL channel count
  usb: ehci-omap: update clock names to be more generic

13 years agoUSB: pxa: Add USB client support for Marvell PXA9xx/PXA168 chips
cxie4 [Tue, 30 Nov 2010 05:35:15 +0000 (13:35 +0800)]
USB: pxa: Add USB client support for Marvell PXA9xx/PXA168 chips

This patch add USB client support Marvell PXA9xx/PXA168 chips. The USB
controller in PXA9xx/PXA168 is a High-Speed OTG controller. The available
endpoints is different between PXA9xx and PXA168.

NOTE:
It is the first version of Marvell PXA9xx/PXA168 USB controller driver.
The support for OTG mode will be added in later patch.
PXA9xx and PXA168 has integrated UTMI PHY in the chips. The initialization
for the PHY is a little different between PXA9xx and PXA168.

Signed-off-by: Chao Xie <chao.xie@marvell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agousb: Add in missing EHCI helpers.
Paul Mundt [Tue, 30 Nov 2010 08:57:02 +0000 (17:57 +0900)]
usb: Add in missing EHCI helpers.

Several of the EHCI glue drivers either predate or were merged in the
same timeframe as API changes at the USB core level, resulting in some
missing endpoint_reset and clear_tt_buffer_complete callbacks.

This fixes up all of ehci-atmel, mxc, w90x900, and xilinx-of to tie in
the new helpers, which brings them in line with everyone else.

Reported-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agousb: gadget: langwell_udc: add usb test mode support
Luo Andy [Tue, 23 Nov 2010 02:41:21 +0000 (10:41 +0800)]
usb: gadget: langwell_udc: add usb test mode support

This patch adds test mode support for Langwell gadget driver.

Signed-off-by: Henry Yuan <hang.yuan@intel.com>
Signed-off-by: Andy Luo <yifei.luo@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agousb: composite gadget: set vbus_draw current limitation during suspend
Hao Wu [Mon, 29 Nov 2010 07:17:03 +0000 (15:17 +0800)]
usb: composite gadget: set vbus_draw current limitation during suspend

This patch modifies the composite gadget to set vbus_draw current limitation
during suspend state. This current limitation in suspend state shouldn't be
more than 2.5mA

Signed-off-by: Hao Wu <hao.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agousb: otg: twl4030-usb: Fix unbalanced regulator disables at module removal
Jarkko Nikula [Tue, 30 Nov 2010 15:58:25 +0000 (17:58 +0200)]
usb: otg: twl4030-usb: Fix unbalanced regulator disables at module removal

Function twl4030_usb_remove can cause unbalanced regulator disables in
twl4030_phy_power if the cable is not connected. Regulator enable/disable
calls are in balance only if the twl4030_phy_resume was called prior the
twl4030_usb_remove, that is, the cable was connected.

Fix this by checking the 'asleep' variable in twl4030_usb_remove since that
variable is used to check state in other functions.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agousb-wwan: implement TIOCGSERIAL and TIOCSSERIAL to avoid blocking close(2)
Dan Williams [Fri, 19 Nov 2010 22:04:00 +0000 (16:04 -0600)]
usb-wwan: implement TIOCGSERIAL and TIOCSSERIAL to avoid blocking close(2)

Some devices (ex ZTE 2726) simply don't respond at all when data is sent
to some of their USB interfaces.  The data gets stuck in the TTYs queue
and sits there until close(2), which them blocks because closing_wait
defaults to 30 seconds (even though the fd is O_NONBLOCK).  This is
rarely desired.  Implement the standard mechanism to adjust closing_wait
and let applications handle it how they want to.

Signed-off-by: Dan Williams <dcbw@redhat.com>
13 years agoUSB: Remove unnecessary casts of void ptr returning alloc function return values
Jesper Juhl [Mon, 8 Nov 2010 23:10:52 +0000 (00:10 +0100)]
USB: Remove unnecessary casts of void ptr returning alloc function return values

Hi,

The [vk][cmz]alloc(_node) family of functions return void pointers which
it's completely unnecessary/pointless to cast to other pointer types since
that happens implicitly.

This patch removes such casts from drivers/usb/

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
13 years agousbmon: correct length for isochronous
Pete Zaitcev [Wed, 17 Nov 2010 04:51:19 +0000 (21:51 -0700)]
usbmon: correct length for isochronous

Usually the usbmon returns the amount of data specified in
urb->transfer_buffer_length for output submissions and urb->actual_length
for input callbacks. However, for Isochronous input transfers, this is
not enough, since the returned data buffer may contain "holes".

One easy way to fix this is to use urb->transfer_buffer_length,
but this often transfers a whole lot of unused data, so we find
how much was actually used instead.

Original patch by MĂĄrton NĂ©meth. See also kernel bug 22182.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: MĂĄrton NĂ©meth <nm127@freemail.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoomap4: 4430sdp: enable the ehci port on 4430SDP
Keshava Munegowda [Sun, 21 Nov 2010 17:53:42 +0000 (23:23 +0530)]
omap4: 4430sdp: enable the ehci port on 4430SDP

The OMAP4 SDP has an SMSC3320 PHY hooked up to EHCI on Port1.
The PHY power is controlled by GPIO 157.

Turn on the PHY power, and register the controller at init.

Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
13 years agoarm: omap4: select USB_ARCH_HAS_EHCI
Anand Gadiyar [Sun, 21 Nov 2010 17:53:42 +0000 (23:23 +0530)]
arm: omap4: select USB_ARCH_HAS_EHCI

The OMAP4 has an on-chip EHCI controller. Select USB_ARCH_HAS_EHCI
to allow the EHCI driver to be built on OMAP4.

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
13 years agoarm: omap4: usb: add platform init code for EHCI
Anand Gadiyar [Sun, 21 Nov 2010 17:53:41 +0000 (23:23 +0530)]
arm: omap4: usb: add platform init code for EHCI

- Add platform init code for EHCI on OMAP4
- Add pad configuration for PHY and TLL modes

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
13 years agoarm: omap4: add USBHOST and related base addresses
Anand Gadiyar [Sun, 21 Nov 2010 17:53:41 +0000 (23:23 +0530)]
arm: omap4: add USBHOST and related base addresses

Add base addresses for USBHOST, USBTLL, EHCI and OHCI to
the header file.

This will disappear when the drivers are converted to use
the hwmod database, however this patch is needed until then.

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
13 years agousb: ehci-omap: Add OMAP4 support
Anand Gadiyar [Sun, 21 Nov 2010 17:53:42 +0000 (23:23 +0530)]
usb: ehci-omap: Add OMAP4 support

Update the ehci-omap glue layer to support the controller in the
OMAP4. Major differences from OMAP3 is that the OMAP4 has per-port
clocking, and supports ULPI output clocking mode. The old input
clocking mode is not supported.

Also, there are only 2 externally available ports as against 3
in the OMAP3. The third port is internally tied off and should
not be used.

Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
13 years agoomap: usb: ehci: introduce HSIC mode
Anand Gadiyar [Sun, 21 Nov 2010 17:53:41 +0000 (23:23 +0530)]
omap: usb: ehci: introduce HSIC mode

The EHCI controller in OMAP4 supports a new interface mode - HSIC.
Add this to the list of modes supported on OMAP3.

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
13 years agousb: ehci-omap: add helpers for checking port mode
Anand Gadiyar [Sun, 21 Nov 2010 17:53:41 +0000 (23:23 +0530)]
usb: ehci-omap: add helpers for checking port mode

Introduce helper functions to test port mode. These checks are
performed in several places in the driver, and these helpers
improve readability.

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
13 years agousb: ehci-omap: use clkdev aliases for functional clocks
Anand Gadiyar [Sun, 21 Nov 2010 17:53:41 +0000 (23:23 +0530)]
usb: ehci-omap: use clkdev aliases for functional clocks

Use the recently updated aliases to get functional clocks needed by
the driver. This allows the driver to acquire OMAP4-specific clocks
without having to use different clock names for OMAP3 and OMAP4.

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
13 years agoomap: clock: add clkdev aliases for EHCI clocks
Anand Gadiyar [Sun, 21 Nov 2010 17:53:41 +0000 (23:23 +0530)]
omap: clock: add clkdev aliases for EHCI clocks

Add clkdev aliases for the USBHOST and USBTLL clocks on OMAP3 and
OMAP4, so that the driver can refer to the clocks using a common alias.

This will disappear when the driver is converted to use the hwmod
database, but until then this patch is needed.

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Acked-by: Paul Walmsley <paul@pwsan.com>
Acked-by: Tony Lindgren <tony@atomide.com>
13 years agousb: ehci: introduce CONFIG_USB_EHCI_HCD_OMAP
Keshava Munegowda [Sun, 21 Nov 2010 17:53:41 +0000 (23:23 +0530)]
usb: ehci: introduce CONFIG_USB_EHCI_HCD_OMAP

Introduce the CONFIG_USB_EHCI_HCD_OMAP option to select
EHCI support on OMAP3 and later chips. This scales better
than having a long line of dependencies for each new OMAP
with EHCI support.

Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
13 years agousb: ehci-omap: don't hard-code TLL channel count
Keshava Munegowda [Sun, 21 Nov 2010 17:53:40 +0000 (23:23 +0530)]
usb: ehci-omap: don't hard-code TLL channel count

Make the TLL channel count a parameter instead of a hardcoded
value. This allows us to be flexible with future OMAP revisions
which could have a different number of channels.

Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
13 years agousb: ehci-omap: update clock names to be more generic
Keshava Munegowda [Sun, 21 Nov 2010 17:53:40 +0000 (23:23 +0530)]
usb: ehci-omap: update clock names to be more generic

Rename usbhost2_120m_fck to usbhost_hs_fck and usbhost1_48m_fck
to usbhost_fs_fck, to better reflect the clocks' functionalities.

In OMAP4, the frequencies for the corresponding clocks are not
necessarily the same as with OMAP3, however the functionalities
are.

Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
13 years agousb: ehci-sh: Add missing ehci helpers.
Paul Mundt [Fri, 26 Nov 2010 07:48:31 +0000 (16:48 +0900)]
usb: ehci-sh: Add missing ehci helpers.

The ehci-sh driver was missing tie-ins for endpoint_reset and
clear_tt_buffer_complete, add them in.

Reported-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agousb: ehci-sh: Fix up fault in shutdown path.
Paul Mundt [Fri, 26 Nov 2010 07:43:38 +0000 (16:43 +0900)]
usb: ehci-sh: Fix up fault in shutdown path.

We can't use the generic usb_hcd_platform_shutdown helper on account of
the fact we don't stash the hcd pointer in the driver data, so we provide
our own shutdown handler.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agoUSB: ce4100: Add support for CE4100 EHCI IP block to EHCI driver
Dirk Brandewie [Wed, 17 Nov 2010 15:43:09 +0000 (07:43 -0800)]
USB: ce4100: Add support for CE4100 EHCI IP block to EHCI driver

This patch adds support for the EHCI IP block present on the Intel
CE4100.

Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com>
CC: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: fix leftover references to udev->autosuspend_delay
Alan Stern [Wed, 17 Nov 2010 15:56:01 +0000 (10:56 -0500)]
USB: fix leftover references to udev->autosuspend_delay

This patch (as1436) takes care of leftover references to
udev->autosuspend_delay that didn't get removed during the earlier
conversion to the runtime-PM autosuspend API.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agousb: gadget: g_fs: Fix compilation warning
Michal Nazarewicz [Wed, 17 Nov 2010 16:09:47 +0000 (17:09 +0100)]
usb: gadget: g_fs: Fix compilation warning

This commit fixes warning in f_fs.c introduced by "usb:
gadget: f_fs: remove custom printk() wrappers":

In file included from drivers/usb/gadget/g_ffs.c:64:
drivers/usb/gadget/f_fs.c:30:1: warning: "pr_fmt" redefined

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: improve uses of usb_mark_last_busy
Alan Stern [Mon, 15 Nov 2010 20:57:58 +0000 (15:57 -0500)]
USB: improve uses of usb_mark_last_busy

This patch (as1434) cleans up the uses of usb_mark_last_busy() in
usbcore.  The function will be called when a device is resumed and
whenever a usage count is decremented.  A call that was missing from
the hub driver is added: A hub is used whenever one of its ports gets
suspended (this prevents hubs from suspending immediately after their
last child).

In addition, the call to disable autosuspend support for new devices
by default is moved from usb_detect_quirks() (where it doesn't really
belong) into usb_new_device() along with all the other runtime-PM
initializations.  Finally, an extra pm_runtime_get_noresume() is added
to prevent new devices from autosuspending while they are being
registered.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: use the runtime-PM autosuspend implementation
Alan Stern [Mon, 15 Nov 2010 20:57:51 +0000 (15:57 -0500)]
USB: use the runtime-PM autosuspend implementation

This patch (as1428) converts USB over to the new runtime-PM core
autosuspend framework.  One slightly awkward aspect of the conversion
is that USB devices will now have two suspend-delay attributes: the
old power/autosuspend file and the new power/autosuspend_delay_ms
file.  One expresses the delay time in seconds and the other in
milliseconds, but otherwise they do the same thing.  The old attribute
can be deprecated and then removed eventually.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: make usb_mark_last_busy use pm_runtime_mark_last_busy
Ming Lei [Mon, 15 Nov 2010 20:57:30 +0000 (15:57 -0500)]
USB: make usb_mark_last_busy use pm_runtime_mark_last_busy

Since the runtime-PM core already defines a .last_busy field in
device.power, this patch uses it to replace the .last_busy field
defined in usb_device and uses pm_runtime_mark_last_busy to implement
usb_mark_last_busy.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Reviewed-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: use sysfs_merge_group for power attributes
Alan Stern [Mon, 15 Nov 2010 20:57:07 +0000 (15:57 -0500)]
USB: use sysfs_merge_group for power attributes

This patch (as1426) makes use of the new sysfs_merge_group() and
sysfs_unmerge_group() routines to simplify the handling of power
attributes for USB devices.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: use the no_callbacks flag for interfaces
Ming Lei [Mon, 15 Nov 2010 20:56:54 +0000 (15:56 -0500)]
USB: use the no_callbacks flag for interfaces

Call pm_runtime_no_callbacks to set no_callbacks flag for USB
interfaces.  Since interfaces cannot be power-managed separately from
their parent devices, there's no reason for the runtime-PM core to
invoke any callbacks for them.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Reviewed-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB device driver of Topcliff PCH
Toshiharu Okada [Thu, 11 Nov 2010 09:27:57 +0000 (18:27 +0900)]
USB device driver of Topcliff PCH

This patch adds the USB device driver of EG20T(Topcliff) PCH.

EG20T PCH is the platform controller hub that is going to be used in
Intel's upcoming general embedded platform. All IO peripherals in
EG20T PCH are actually devices sitting on AMBA bus.
EG20T PCH has USB device I/F. Using this I/F, it is able to access system
devices connected to USB device.

Signed-off-by: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com>
Acked-by: MichaƂ Nazarewicz <m.nazarewicz@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agousb: gadget: f_fs: remove custom printk() wrappers
Michal Nazarewicz [Fri, 12 Nov 2010 13:29:29 +0000 (14:29 +0100)]
usb: gadget: f_fs: remove custom printk() wrappers

This commit removes custom printk() wrappers from the f_fs.c
file.  They served little purpose above what pr_*() family of
macros provides.  Only FVDBG() has been left but renamed to
pr_vdebug() to match other uses.

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agousb: gadget: FunctionFS: fix typos and coding style
Michal Nazarewicz [Fri, 12 Nov 2010 13:29:28 +0000 (14:29 +0100)]
usb: gadget: FunctionFS: fix typos and coding style

This commit changes FunctionFS as to make it more compliant
with coding style as well as fixes several typos.

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agodrivers/uwb: Use printf extension %pR for struct resource
Joe Perches [Fri, 12 Nov 2010 21:38:02 +0000 (13:38 -0800)]
drivers/uwb: Use printf extension %pR for struct resource

Using %pR standardizes the struct resource output.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agodrivers/usb/gadget: Remove unnecessary semicolons
Joe Perches [Mon, 15 Nov 2010 03:04:49 +0000 (19:04 -0800)]
drivers/usb/gadget: Remove unnecessary semicolons

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agodrivers/usb/host/uhci-hcd.c: Remove unnecessary casts of pci_get_drvdata
Joe Perches [Mon, 15 Nov 2010 20:14:01 +0000 (12:14 -0800)]
drivers/usb/host/uhci-hcd.c: Remove unnecessary casts of pci_get_drvdata

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB host: Adding USB ehci & ohci support for spear platform
Deepak Sikri [Wed, 10 Nov 2010 09:03:18 +0000 (14:33 +0530)]
USB host: Adding USB ehci & ohci support for spear platform

This patch adds support for ehci and ohci controller in the SPEAr platform.

Changes since V2:
added clear_tt_buffer_complete in ehci_spear_hc_driver

Signed-off-by: Deepak Sikri <deepak.sikri@st.com>
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agousb: Add support for VIA VT8500 and compatibles in EHCI HCD
Alexey Charkov [Sun, 7 Nov 2010 16:28:55 +0000 (19:28 +0300)]
usb: Add support for VIA VT8500 and compatibles in EHCI HCD

VIA and WonderMedia Systems-on-Chip feature a standard EHCI host
controller. This adds necessary glue to use the standard driver
with these systems.

Signed-off-by: Alexey Charkov <alchark@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agousb: dummy_hcd code simplification
Tatyana Brokhman [Mon, 1 Nov 2010 15:38:05 +0000 (17:38 +0200)]
usb: dummy_hcd code simplification

Take handling of the control requests out from dummy_timer to a different
function.

Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agousb: USB3.0 ch11 definitions
Tatyana Brokhman [Mon, 1 Nov 2010 16:18:24 +0000 (18:18 +0200)]
usb: USB3.0 ch11 definitions

Adding hub SuperSpeed usb definitions as defined by ch10 of the USB3.0
spec.

Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: gadget: f_mass_storage: code style clean ups
Michal Nazarewicz [Thu, 28 Oct 2010 15:31:23 +0000 (17:31 +0200)]
USB: gadget: f_mass_storage: code style clean ups

This commit is purely style clean ups.

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: gadget: f_mass_storage: remove needless complete()
Michal Nazarewicz [Thu, 28 Oct 2010 15:31:22 +0000 (17:31 +0200)]
USB: gadget: f_mass_storage: remove needless complete()

This commit removes call to the complete() function done in
fsg_unbind() which was never needed there but was a leftover
form file_storage.c.

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: gadget: f_mass_storage: drop START_TRANSFER() macro
Michal Nazarewicz [Thu, 28 Oct 2010 15:31:21 +0000 (17:31 +0200)]
USB: gadget: f_mass_storage: drop START_TRANSFER() macro

This commit drops START_TRANSFER_OR() and START_TRANSFER()
macros with a pair of nice inline functions which are actually
more readable and easier to use.

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: gadget: f_mass_storage: use ?: instead of a macro
Michal Nazarewicz [Thu, 28 Oct 2010 15:31:20 +0000 (17:31 +0200)]
USB: gadget: f_mass_storage: use ?: instead of a macro

This commit removes an "OR" macro defined in Mass Storage
Function in favour of a two argument version of "?:" operator
(which is a GCC extension).

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: gadget: f_mass_storage: put_device() in error recovery
Rahul Ruikar [Thu, 28 Oct 2010 15:31:19 +0000 (17:31 +0200)]
USB: gadget: f_mass_storage: put_device() in error recovery

This commit fixes an issue with error recovery after
device_register() fails in Mass Storage Function.  The device
needs to be put to avoid resource leakage.

Signed-off-by: Rahul Ruikar <rahul.ruikar@gmail.com>
[mina86@mina86.com: updated commit message]
Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: gadget: file_storage: put_device() in error recovery
Michal Nazarewicz [Thu, 28 Oct 2010 15:31:18 +0000 (17:31 +0200)]
USB: gadget: file_storage: put_device() in error recovery

This commit fixes some issues with File-backed Storage Gadget
error recovery when registering LUN's devices.

First of all, when device_register() fails the device still
needs to be put.  However, because lun_release() decreases
fsg->ref reference counter the counter must be incremented
beforehand.

Second of all, after any of the device_create_file()s fails,
device_unregister() is called which in turn (indirectly) calls
lun_release() which decrements fsg->ref.  So, again, the
reference counter must be incremented beforehand.

Lastly, if the first or the second device_create_file()
succeeds, the files are never removed.  To fix it,
device_remove_file() needs to be called.  This is done by
simply marking LUN as registered prior to creating files so
that fsg_unbind() can handle removing files.

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Reported-by: Rahul Ruikar <rahul.ruikar@gmail.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: gadget: composite: Typo fix.
Marek Belisko [Wed, 27 Oct 2010 08:19:01 +0000 (10:19 +0200)]
USB: gadget: composite: Typo fix.

Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: gadget: amd5536udc.c: delete double assignment
Julia Lawall [Tue, 26 Oct 2010 10:25:31 +0000 (12:25 +0200)]
USB: gadget: amd5536udc.c: delete double assignment

Delete successive assignments to the same location.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression i;
@@

*i = ...;
 i = ...;
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Thomas Dahlmann <dahlmann.thomas@arcor.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>