Commit Graph

7 Commits

Author SHA1 Message Date
Anton Tikhomirov 3294908bc0 usb: phy: Add and use missed OTG FSM timers
a_bidl_adis_tmr and a_wait_vfall_tmr OTG timers missed in
current FSM implementation. This patch adds and makes use
of the timers as speicfied in OTG and EH supplement to USB2.0.

Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-10-04 09:44:47 -05:00
Anton Tikhomirov f6de27eed3 usb: phy: Fix OTG FSM timer handling
Get rid of using OTG driver specific timers by passing timer
type to corresponding callbacks.

Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-10-04 09:44:46 -05:00
Anton Tikhomirov 425d710172 usb: phy: Add and use missed helper functions
This patch implements missed helper functions for start_gadget() and
start_host() OTG FSM callbacks.

Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-10-04 09:44:46 -05:00
Anton Tikhomirov 737cc66eac usb: phy: Check OTG FSM callback existance in helper functions
Existence of callback must be checked to avoid NULL pointer
dereferncing.

Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-10-04 09:44:45 -05:00
Anton Tikhomirov da8cc16724 usb: phy: Pass OTG FSM pointer to callback functions
struct otg_fsm may be embedded to device's context structure.
The callbacks may require pointer to struct otg_fsm to obtain
necessary data for its operation (example: regulator reference
for drv_vbus()).

Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-10-04 09:44:44 -05:00
Greg Kroah-Hartman 523e531ea6 USB: phy: remove custom DBG macro
Use the in-kernel pr_debug() calls instead of trying to roll your own
DBG macro.  This means the dynamic debugging calls now work here, and
there is no dependency on CONFIG_USB_DEBUG for the phy code anymore.

Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23 16:33:23 -07:00
Felipe Balbi 94ae98433a usb: phy: rename all phy drivers to phy-$name-usb.c
this will make sure that we have sensible names
for all phy drivers. Current situation was already
quite bad with too generic names being used.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-03-18 11:18:08 +02:00