summaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb
diff options
context:
space:
mode:
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>2012-02-13 13:24:20 +0200
committerFelipe Balbi <balbi@ti.com>2012-02-27 15:41:52 +0200
commit6e13c6505cdff9766d5268ffb8c972c1a2f996e6 (patch)
treee5e08928aaecfae70f5b2b904df1a30551af08d4 /drivers/usb/musb
parent136ced891ad2762dfe5ba476103e82ea2b9aff41 (diff)
downloadop-kernel-dev-6e13c6505cdff9766d5268ffb8c972c1a2f996e6.zip
op-kernel-dev-6e13c6505cdff9766d5268ffb8c972c1a2f996e6.tar.gz
usb: otg: Convert all users to pass struct usb_otg for OTG functions
This changes the otg functions so that they receive struct otg instead of struct usb_phy as parameter and converts all users of these functions to pass the otg member of their usb_phy. Includes fixes to IMX code from Sascha Hauer. [ balbi@ti.com : fixed a compile warning on ehci-mv.c ] Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Igor Grinberg <grinberg@compulab.co.il> Acked-by: Pavankumar Kondeti <pkondeti@codeaurora.org> Acked-by: Li Yang <leoli@freescale.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Reviewed-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb')
-rw-r--r--drivers/usb/musb/musb_core.c2
-rw-r--r--drivers/usb/musb/musb_gadget.c8
-rw-r--r--drivers/usb/musb/omap2430.c8
3 files changed, 9 insertions, 9 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 7e9be74..88bf453 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -1961,7 +1961,7 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
if (is_host_enabled(musb)) {
struct usb_hcd *hcd = musb_to_hcd(musb);
- otg_set_host(musb->xceiv, &hcd->self);
+ otg_set_host(musb->xceiv->otg, &hcd->self);
if (is_otg_enabled(musb))
hcd->self.otg_port = 1;
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index 3a17936..caeaf9f 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -1624,7 +1624,7 @@ static int musb_gadget_wakeup(struct usb_gadget *gadget)
}
spin_unlock_irqrestore(&musb->lock, flags);
- otg_start_srp(musb->xceiv);
+ otg_start_srp(musb->xceiv->otg);
spin_lock_irqsave(&musb->lock, flags);
/* Block idling for at least 1s */
@@ -1915,7 +1915,7 @@ static int musb_gadget_start(struct usb_gadget *g,
spin_lock_irqsave(&musb->lock, flags);
musb->is_active = 1;
- otg_set_peripheral(musb->xceiv, &musb->g);
+ otg_set_peripheral(otg, &musb->g);
musb->xceiv->state = OTG_STATE_B_IDLE;
/*
@@ -1947,7 +1947,7 @@ static int musb_gadget_start(struct usb_gadget *g,
if ((musb->xceiv->last_event == USB_EVENT_ID)
&& otg->set_vbus)
- otg_set_vbus(musb->xceiv, 1);
+ otg_set_vbus(otg, 1);
hcd->self.uses_pio_for_control = 1;
}
@@ -2029,7 +2029,7 @@ static int musb_gadget_stop(struct usb_gadget *g,
musb->xceiv->state = OTG_STATE_UNDEFINED;
stop_activity(musb, driver);
- otg_set_peripheral(musb->xceiv, NULL);
+ otg_set_peripheral(musb->xceiv->otg, NULL);
dev_dbg(musb->controller, "unregistering driver %s\n", driver->function);
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index 96a3d37..d8df60a 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -164,8 +164,8 @@ static void omap2430_musb_set_vbus(struct musb *musb, int is_on)
}
}
- if (ret && musb->xceiv->set_vbus)
- otg_set_vbus(musb->xceiv, 1);
+ if (ret && otg->set_vbus)
+ otg_set_vbus(otg, 1);
} else {
musb->is_active = 1;
otg->default_a = 1;
@@ -270,8 +270,8 @@ static void musb_otg_notifier_work(struct work_struct *data_notifier_work)
}
if (data->interface_type == MUSB_INTERFACE_UTMI) {
- if (musb->xceiv->set_vbus)
- otg_set_vbus(musb->xceiv, 0);
+ if (musb->xceiv->otg->set_vbus)
+ otg_set_vbus(musb->xceiv->otg, 0);
}
usb_phy_shutdown(musb->xceiv);
break;
OpenPOWER on IntegriCloud