mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
usb: otg: mv_otg: Start using struct usb_otg
Use struct usb_otg members with OTG specific functions instead of usb_phy members. [ [email protected] : fixed a compile error on isp1704_charger.c ] Signed-off-by: Heikki Krogerus <[email protected]> Reviewed-by: Marek Vasut <[email protected]> Acked-by: Neil Zhang <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
This commit is contained in:
parent
fcc8ebc990
commit
b1c711d629
3 changed files with 69 additions and 55 deletions
|
|
@ -274,8 +274,8 @@ static void isp1704_charger_work(struct work_struct *data)
|
|||
case POWER_SUPPLY_TYPE_USB:
|
||||
default:
|
||||
/* enable data pullups */
|
||||
if (isp->phy->gadget)
|
||||
usb_gadget_connect(isp->phy->gadget);
|
||||
if (isp->phy->otg->gadget)
|
||||
usb_gadget_connect(isp->phy->otg->gadget);
|
||||
}
|
||||
break;
|
||||
case USB_EVENT_NONE:
|
||||
|
|
@ -293,8 +293,8 @@ static void isp1704_charger_work(struct work_struct *data)
|
|||
* chargers. The pullups may be enabled elsewhere, so this can
|
||||
* not be the final solution.
|
||||
*/
|
||||
if (isp->phy->gadget)
|
||||
usb_gadget_disconnect(isp->phy->gadget);
|
||||
if (isp->phy->otg->gadget)
|
||||
usb_gadget_disconnect(isp->phy->otg->gadget);
|
||||
|
||||
isp1704_charger_set_power(isp, 0);
|
||||
break;
|
||||
|
|
@ -459,8 +459,8 @@ static int __devinit isp1704_charger_probe(struct platform_device *pdev)
|
|||
* enumerated. The charger driver should be always loaded before any
|
||||
* gadget is loaded.
|
||||
*/
|
||||
if (isp->phy->gadget)
|
||||
usb_gadget_disconnect(isp->phy->gadget);
|
||||
if (isp->phy->otg->gadget)
|
||||
usb_gadget_disconnect(isp->phy->otg->gadget);
|
||||
|
||||
/* Detect charger if VBUS is valid (the cable was already plugged). */
|
||||
ret = isp1704_read(isp, ULPI_USB_INT_STS);
|
||||
|
|
|
|||
Loading…
Reference in a new issue