Commit graph

361622 commits

Author SHA1 Message Date
Chao Xie
1805e811f0 arm: mmp: remove clock name from usb pdata for ttc
The clock name will directly get by driver. Removing
the name from pdata.

Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Chao Xie <chao.xie@marvell.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-04-02 11:42:46 +03:00
Chao Xie
8f75d40098 arm: mmp: remove clock from usb pdata for aspenite
The clock name will directly get by driver. Removing
the name from pdata.

Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Chao Xie <chao.xie@marvell.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-04-02 11:42:46 +03:00
Chao Xie
b7e159c295 usb: ehci: mv_ehci: remove unused clock
The origianl understanding of clock is wrong. The EHCI controller
only have one clock input.
Passing clock name by pdata is wrong. The clock is defined by device
iteself.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Chao Xie <chao.xie@marvell.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-04-02 11:42:46 +03:00
Chao Xie
df18fedae5 usb: otg: mv_otg: remove unused clock
The origianl understanding of clock is wrong. The OTG controller
only have one clock input.
Passing clock name by pdata is wrong. The clock is defined by device
iteself.

Signed-off-by: Chao Xie <chao.xie@marvell.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-04-02 11:42:45 +03:00
Chao Xie
1919811fe6 usb: gadget: mv_udc_core: remove unused clock
The origianl understanding of clock is wrong. The UDC controller
only have one clock input.
Passing clock name by pdata is wrong. The clock is defined by device
iteself.

Signed-off-by: Chao Xie <chao.xie@marvell.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-04-02 11:42:45 +03:00
Grazvydas Ignotas
b65ae0f1a7 usb: musb: gadget: use platform callback to enable vbus
On some platform configurations (like OMAP3+twl4030) it's the platform
code that enables VBUS, not OTG transceiver, so call vbus platform
callback instead, it will then call the transceiver if needed.

This fixes a use case where USB cable is plugged first and gadget
driver is loaded later after that.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-04-02 11:42:44 +03:00
Grazvydas Ignotas
2c1fe89db1 usb: musb: omap2430: turn off vbus on cable disconnect
On USB_EVENT_ID event the musb glue enables VBUS by calling
omap2430_musb_set_vbus(musb, 1) that sets the session bit, but on
USB_EVENT_NONE reverse action is never made, and that breaks PM.

Disable VBUS on USB_EVENT_NONE to be sure musb session is ended
on cable unplug so that PM works.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-04-02 11:42:44 +03:00
Grazvydas Ignotas
f65f4f40fb usb: phy: twl4030-usb: check if vbus is driven by twl itself
At least on pandora, STS_VBUS gets set even when VBUS is driven by twl
itself. Reporting VBUS in this case confuses OMAP musb glue and charger
driver, so check if OTG VBUS charge pump is on before reporting VBUS
event to avoid this problem.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-04-02 11:42:41 +03:00
Felipe Balbi
6b0cfc656f usb: musb: ux500_dma: fix sparse warning
fix the following sparse warning:

drivers/usb/musb/ux500_dma.c:60:6: warning: symbol 'ux500_dma_callback' was not declared. Should it be static?

Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-27 13:19:00 +02:00
Felipe Balbi
6fbb2f7dae usb: gadget: mv_u3d: fix sparse warnings
fix the following sparse warnings:

drivers/usb/gadget/mv_u3d_core.c:223:20: warning: context imbalance in 'mv_u3d_done' - unexpected unlock
drivers/usb/gadget/mv_u3d_core.c:1562:25: warning: context imbalance in 'mv_u3d_handle_setup_packet' - unexpected unlock

Note that the non-trivial sparse warnings
are left out of this commit due to lack of
HW to test:

drivers/usb/gadget/mv_u3d_core.c:906:42: warning: incorrect type in argument 2 (different address spaces)
drivers/usb/gadget/mv_u3d_core.c:906:42:    expected void [noderef] <asn:2>*<noident>
drivers/usb/gadget/mv_u3d_core.c:906:42:    got unsigned int *<noident>

Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-27 13:19:00 +02:00
Felipe Balbi
94a06018de usb: gadget: mv_udc_core: fix sparse warnings
fix the following sparse warnings:

drivers/usb/gadget/mv_udc_core.c:1850:6: warning: symbol 'irq_process_reset' was not declared. Should it be static?
drivers/usb/gadget/mv_udc_core.c:247:9: warning: context imbalance in 'done' - unexpected unlock
drivers/usb/gadget/mv_udc_core.c:1692:25: warning: context imbalance in 'handle_setup_packet' - unexpected unlock

Note that there are still other sparse warnings
which aren't trivial to fix, so I left them out:

drivers/usb/gadget/mv_udc_core.c:848:34: warning: incorrect type in argument 1 (different address spaces)
drivers/usb/gadget/mv_udc_core.c:848:34:    expected void const volatile [noderef] <asn:2>*addr
drivers/usb/gadget/mv_udc_core.c:848:34:    got unsigned int *<noident>
drivers/usb/gadget/mv_udc_core.c:849:42: warning: incorrect type in argument 2 (different address spaces)
drivers/usb/gadget/mv_udc_core.c:849:42:    expected void volatile [noderef] <asn:2>*addr
drivers/usb/gadget/mv_udc_core.c:849:42:    got unsigned int *<noident>

Acked-by: Neil Zhang <zhangwm@marvell.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-27 13:18:59 +02:00
Felipe Balbi
3f8b620124 usb: gadget: pch_udc: fix sparse warnings
fix the following sparse warnings:

drivers/usb/gadget/pch_udc.c:1483:9: warning: context imbalance in 'complete_req' - unexpected unlock
drivers/usb/gadget/pch_udc.c:2408:28: warning: context imbalance in 'pch_udc_svc_control_out' - unexpected unlock

Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-27 13:18:59 +02:00
Felipe Balbi
814cf212f9 usb: gadget: dummy: fix sparse warning
fix the following sparse warning:

drivers/usb/gadget/dummy_hcd.c:1912:12: warning: symbol 'usb3_bos_desc' was not declared. Should it be static?

Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-27 13:18:58 +02:00
Felipe Balbi
ad303db62d usb: gadget: net2280: fix sparse warnings
fix the following sparse warnings:

drivers/usb/gadget/net2280.c:2063:13: warning: Using plain integer as NULL pointer
drivers/usb/gadget/net2280.c:2321:68: warning: Using plain integer as NULL pointer
drivers/usb/gadget/net2280.c:2349:68: warning: Using plain integer as NULL pointer
drivers/usb/gadget/net2280.c:2371:68: warning: Using plain integer as NULL pointer

Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-27 13:18:58 +02:00
Felipe Balbi
69147121ab usb: gadget: net2272: fix sparse warnings
Fix the following sparse warnings:

drivers/usb/gadget/net2272.c:916:13: warning: Using plain integer as NULL pointer
drivers/usb/gadget/net2272.c:1624:9: warning: Using plain integer as NULL pointer
drivers/usb/gadget/net2272.c:1552:30: warning: right shift by bigger than source value

Note that the last warning is an actual bug,
since ep->dma is a one bit value which is
shifted by one bit in code.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-27 13:18:57 +02:00
Felipe Balbi
60630c2eab usb: gadget: mv_u3d: drop ARCH dependency
this driver compiles fine everywhere which
means we can use linux-next to compile it
for us frequently.

By dropping the arch dependency, we also
ensure driver writers don't add virtual
arch-depdencies to the driver by e.g. using
the wrong headers.

While at that, fix Marvell's USB3 PHY dependency,
that's the driver which depends on CPU_MM3, not
mv_u3d_core.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-27 13:18:20 +02:00
Felipe Balbi
e6667ef7ac usb: gadget: mv_u3d: fix sparse warnings
Fix the following sparse warnings:

drivers/usb/gadget/mv_u3d_core.c: In function ‘mv_u3d_ep_queue’:
drivers/usb/gadget/mv_u3d_core.c:812:2: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
drivers/usb/gadget/mv_u3d_core.c:822:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
drivers/usb/gadget/mv_u3d_core.c:823:4: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
drivers/usb/gadget/mv_u3d_core.c:823:28: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
drivers/usb/gadget/mv_u3d_core.c: In function ‘mv_u3d_ep_dequeue’:
drivers/usb/gadget/mv_u3d_core.c:905:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
drivers/usb/gadget/mv_u3d_core.c: In function ‘mv_u3d_probe’:
drivers/usb/gadget/mv_u3d_core.c:1840:3: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
drivers/usb/gadget/mv_u3d_core.c:1855:51: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
drivers/usb/gadget/mv_u3d_core.c:1855:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
drivers/usb/gadget/mv_u3d_core.c:1858:53: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
drivers/usb/gadget/mv_u3d_core.c:1858:18: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
drivers/usb/gadget/mv_u3d_core.c: In function ‘mv_u3d_irq_process_tr_complete’:
drivers/usb/gadget/mv_u3d_core.c:163:21: warning: ‘remaining_length’ may be used uninitialized in this function [-Wmaybe-uninitialized]
drivers/usb/gadget/mv_u3d_core.c:125:28: note: ‘remaining_length’ was declared here

Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-22 09:15:10 +02:00
Felipe Balbi
af593da481 usb: gadget: mv_u3d: remove outdated selects
USB_GADGET_{DUAL,SUPER}SPEED symbols have
been removed by commit 85b8614 (usb: gadget:
get rid of USB_GADGET_{DUAL,SUPER}SPEED), for
some reason mv_u3d_core was lost.

Remove those selects now.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-22 09:12:23 +02:00
Felipe Balbi
a10713a59a usb: gadget: mv_u3d: remove unused headers
none of those headers are used by the driver,
removing them still compiles fine.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-22 09:11:17 +02:00
Jingoo Han
4895a2ee5d usb: gadget: mv_u3d: make mv_u3d_pm_ops static
Make mv_u3d_pm_ops static because mv_u3d_pm_ops is not exported.
Also, CONFIG_PM_SLEEP is used to remove unnecessary ifdefs.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-22 08:45:12 +02:00
Grazvydas Ignotas
54485116cd usb: musb: core: log VBUS error
VBUS_ERROR is a serious error that the driver often doesn't recover from
in my tests, so we should at least inform the user about it.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-22 08:44:24 +02:00
Grazvydas Ignotas
e21de10cd8 usb: musb: gadget: clear gadget_driver when gadget is stopped
Some musb glue drivers use gadget_driver pointer to know if any gadget
drivers are loaded at some moment and base further decisions on it,
like to do runtime suspend/resume or not. Right now the pointer is
left alone on stop and OMAP musb glue later does wrong runtime_pm
decisions because of it.

Clear the gadget_driver pointer on remove, it's invalid after stop
anyway.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-22 08:41:28 +02:00
Grazvydas Ignotas
e561511280 usb: musb: core: honour initial transceiver state
As the usb transceiver driver usually starts first, it should already
have default_a variable set according to ID pin state, so don't
override it. In case default_a was not changed by trasceiver, it will
default to 0 and this code will work as before.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-22 08:40:48 +02:00
Felipe Balbi
4261b8f353 usb: host: ehci-tegra: fix PHY error handling
PHY layer no longer returns NULL, we must
switch from IS_ERR_OR_NULL() to IS_ERR().

Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-21 20:14:12 +02:00
Grazvydas Ignotas
249751f223 usb: phy: twl4030-usb: poll for ID disconnect
On pandora, STS_USB interrupt doesn't arrive on USB host cable disconnect
for some reason while VBUS is driven by twl itself, but STS_HW_CONDITIONS
is updated correctly. It does work fine when PHY is powered down though.
To work around that we have to poll.

This patch also moves twl->linkstat update code to callers so that
changes can be handled in thread safe way (as polling work can trigger
at the same time as real irq now).

TI PSP kernels have similar workarounds, so (many?) more boards are likely
affected.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-21 14:20:30 +02:00
Grazvydas Ignotas
15460de7f3 usb: phy: twl4030-usb: don't switch the phy on/off needlessly
With runtime_pm in place there is no longer need to turn the phy
on/off in OTG layer on cable connect/disconnect, OMAP glue does
this through otg.set_suspend() callback after it's called through
omap_musb_mailbox() on VBUS/ID interrupt. Not doing this will save
power when cable is connected but no gadget driver is loaded.

This will also have side effect of automatic USB charging no longer
working without twl4030_charger driver, because a regulator needed
for charging will no longer be enabled, so be sure to enable charger
driver if charging is needed.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-21 14:20:29 +02:00
Grazvydas Ignotas
ca4f70ce78 usb: phy: twl4030-usb: ignore duplicate events
In some rare cases we may get multiple interrupts that will generate
duplicate omap_musb_mailbox() calls. This is a problem because each
VBUS/ID event generates runtime_pm call in OMAP glue code, causing
unbalanced gets or puts and breaking PM.

The same goes for initial state, glue already defaults to "no cable"
state, so only bother it if we have VBUS or ID.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-21 14:20:29 +02:00
Grazvydas Ignotas
44a50d088a usb: phy: twl4030-usb: don't enable PHY during init
There is no need to do it, otg.set_suspend(false) (which itself
comes from runtime_pm OMAP glue calls) will enable it later anyway.
This used to be the place where things were enabled if booted with
cable connected before runtime_pm conversion, but now can be dropped.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-21 14:20:28 +02:00
Felipe Balbi
75f32ec1de arm: tegra: fix Kconfig select clauses
USB_ULPI and USB_ULPI_VIEWPORT shouldn't really
be selected directly by anyone, but since Tegra
still needs some time before turning ulpi viewport
into a proper PHY driver, we need to keep the
selects in place.

This patch just fixes the conditional select
so that it will continue to build after merging
the latest PHY layer changes.

Acked-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-20 19:56:21 +02:00
Felipe Balbi
e8d891fb7b usb: phy: gpio-vbus: don't ignore regulator APIs return value
Due to recent changes to regulator API, all
users which don't check regulator_{en,dis}able()'s
return value will generate compile warnings.

Add such checks to gpio-vbus.

Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-20 08:01:53 +02:00
Felipe Balbi
b64a15930c usb: phy: samsung: fix sparse warning
Fix the following sparse warning:

drivers/usb/phy/phy-samsung-usb2.c:50:26: sparse: incorrect type in argument 1 (different address spaces)
drivers/usb/phy/phy-samsung-usb2.c:50:26:    expected void const volatile [noderef] <asn:2>*addr
drivers/usb/phy/phy-samsung-usb2.c:50:26:    got void *

Cc: Vivek Gautam <gautam.vivek@samsung.com>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-19 10:14:35 +02:00
Fabio Baltieri
af6882be36 usb: phy: ab8500-usb: update irq handling code
Update irq handling code to notify all possible link status changes of
AB8500 and AB8505 to the ux500-musb glue driver.  The additional event
codes will be used for pm-runtime implementation, and are defined in a
separate ux500-specific header.

This also modify the irq registration code to use devm_* helpers and
drop all non necessary fail path code.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-18 14:41:33 +02:00
Fabio Baltieri
73f226cbd7 usb: otg: ab8500-usb: drop support for ab8500 pre v2.0
AB8500 versions preceding 2.0 were only used internally by ST-Ericsson
and are not supported anymore.  This patch drops all v1.0 and v1.1
support code.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-18 14:41:33 +02:00
Fabio Baltieri
0135522c48 usb: musb: ux500: add otg notifier support
Add transceiver notifier event handling to the ux500 driver to set vbus
on specific transceiver events.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>

[ balbi@ti.com: fix build error due to missing
	otg_state_string() ]

Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-18 14:41:32 +02:00
Fabio Baltieri
996a9d26d3 usb: musb: ux500: implement musb_set_vbus
Add ux500_musb_set_vbus() implementation for ux500.

This is based on the version originally developed inside ST-Ericsson.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>

[ balbi@ti.com: fix a build error due to
	missing otg_state_string() ]

Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-18 14:41:32 +02:00
Virupax Sadashivpetimath
399e0f4f00 usb: musb: ux500_dma: add missing MEM resource check
Fix dma_controller_create() fail path in case memory resource is
missing.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com>
Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-18 14:41:31 +02:00
Felipe Balbi
9ee1c7fbea usb: host: ohci-exynos: fix PHY error handling
PHY layer no longer returns NULL. We must
switch from IS_ERR_OR_NULL() to IS_ERR().

Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-18 14:41:30 +02:00
Felipe Balbi
a16283e11d usb: host: ehci-s5p: fix PHY error handling
PHY layer no longer returns NULL. We must
switch from IS_ERR_OR_NULL() to IS_ERR().

Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-18 11:18:31 +02:00
Felipe Balbi
6f3ed4ec18 usb: host: ehci-mv: fix PHY error handling
PHY layer no longer returns NULL. We must
switch from IS_ERR_OR_NULL() to IS_ERR().

Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-18 11:18:31 +02:00
Felipe Balbi
e299bd93e4 usb: host: ehci-msm: fix PHY error handling
PHY layer no longer returns NULL. We must
switch from IS_ERR_OR_NULL() to IS_ERR().

Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-18 11:18:30 +02:00
Felipe Balbi
a90199bb94 usb: musb: omap2430: fix PHY error handling
PHY layer no longer returns NULL. It will
return -ENXIO when PHY layer isn't enabled
and we can use that to bail out instead of
request a probe deferral.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-18 11:18:29 +02:00
Felipe Balbi
f4f5ba5e7d usb: gadget: s3c-hsotg: fix PHY error handling
PHY laye rno longer return NULL. We need to
switch over from IS_ERR_OR_NULL() to IS_ERR().

Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-18 11:18:29 +02:00
Felipe Balbi
4dbb716125 usb: gadget: mv_udc_core: fix PHY error handling
PHY layer no longer returns NULL. It will
return -ENXIO when PHY layer isn't enabled
and we can use that to bail out instead of
request a probe deferral.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-18 11:18:28 +02:00
Felipe Balbi
d105e7f86f usb: dwc3: fix PHY error handling
PHY layer no longer returns NULL. It will
return -ENXIO when PHY layer isn't enabled
and we can use that to bail out instead of
request a probe deferral.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-18 11:18:28 +02:00
Kishon Vijay Abraham I
817e5f33d0 usb: phy: twl4030: fix cold plug on OMAP3
Having twl4030_usb_phy_init() (detects if a cable is connected before
twl4030 is probed) in twl4030 probe makes cable connect events to be
missed by musb glue, since it gets loaded after twl4030. Having
twl4030_usb_phy_init as a usb_phy ops lets twl4030_usb_phy_init to be
called when glue is ready.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Tested-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-18 11:18:27 +02:00
Kishon Vijay Abraham I
9166902c43 usb: phy: twl4030: use devres API for regulator get and request irq
Used devres APIs devm_request_threaded_irq and devm_regulator_get for
requesting irq and for getting regulator respectively.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Tested-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-18 11:18:27 +02:00
Felipe Balbi
b7fa5c2aec usb: phy: return -ENXIO when PHY layer isn't enabled
in cases where PHY layer isn't enabled, we want
to still return an error code (actually an error
pointer) so that our users don't need to cope with
either error pointer of NULL.

This will simplify users as below:

-	return IS_ERR(phy) ? PTR_ERR(phy) : -ENODEV;
+	return PTR_ERR(phy);

Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
Reported-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-18 11:18:26 +02:00
Kishon Vijay Abraham I
3bf6db9bbe usb: musb: omap: add usb_phy_init in omap2430_musb_init
Some PHYs load too early (twl4030) making omap glue to miss cable connect events
if the board is booted with cable connected. So adding usb_phy_init in
omap2430_musb_init lets PHYs to report events once glue is ready.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-18 11:18:26 +02:00
Kishon Vijay Abraham I
bb467cf569 usb: musb: omap: remove the check before calling otg_set_vbus
No functional change. otg_set_vbus is already protected so removed the
check before calling otg_set_vbus.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-18 11:18:25 +02:00
Dan Carpenter
a5eaaa1f33 usb: gadget: uvc: use capped length value
"req->length" is a capped version of "data->length".

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-18 11:18:25 +02:00