diff options
author | Heikki Krogerus <heikki.krogerus@linux.intel.com> | 2012-02-13 13:24:02 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-02-13 13:34:36 +0200 |
commit | 8675381109b0eb1c948a423c2b35e3f4509cb25e (patch) | |
tree | 1b71e8d77114a75f5871569fd0784fe0b4c861e3 /drivers/usb/otg/msm_otg.c | |
parent | 62aa2b537c6f5957afd98e29f96897419ed5ebab (diff) |
usb: otg: Rename otg_transceiver to usb_phy
This is the first step in separating USB transceivers from
USB OTG utilities.
Includes fixes to IMX code from Sascha Hauer.
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Acked-by: Li Yang <leoli@freescale.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Reviewed-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/otg/msm_otg.c')
-rw-r--r-- | drivers/usb/otg/msm_otg.c | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/drivers/usb/otg/msm_otg.c b/drivers/usb/otg/msm_otg.c index b276f8fcdeba..cba4737a04f4 100644 --- a/drivers/usb/otg/msm_otg.c +++ b/drivers/usb/otg/msm_otg.c @@ -235,7 +235,7 @@ static int msm_hsusb_ldo_set_mode(int on) return ret < 0 ? ret : 0; } -static int ulpi_read(struct otg_transceiver *otg, u32 reg) +static int ulpi_read(struct usb_phy *otg, u32 reg) { struct msm_otg *motg = container_of(otg, struct msm_otg, otg); int cnt = 0; @@ -260,7 +260,7 @@ static int ulpi_read(struct otg_transceiver *otg, u32 reg) return ULPI_DATA_READ(readl(USB_ULPI_VIEWPORT)); } -static int ulpi_write(struct otg_transceiver *otg, u32 val, u32 reg) +static int ulpi_write(struct usb_phy *otg, u32 val, u32 reg) { struct msm_otg *motg = container_of(otg, struct msm_otg, otg); int cnt = 0; @@ -390,7 +390,7 @@ static int msm_otg_phy_reset(struct msm_otg *motg) } #define LINK_RESET_TIMEOUT_USEC (250 * 1000) -static int msm_otg_reset(struct otg_transceiver *otg) +static int msm_otg_reset(struct usb_phy *otg) { struct msm_otg *motg = container_of(otg, struct msm_otg, otg); struct msm_otg_platform_data *pdata = motg->pdata; @@ -448,7 +448,7 @@ static int msm_otg_reset(struct otg_transceiver *otg) #ifdef CONFIG_PM_SLEEP static int msm_otg_suspend(struct msm_otg *motg) { - struct otg_transceiver *otg = &motg->otg; + struct usb_phy *otg = &motg->otg; struct usb_bus *bus = otg->host; struct msm_otg_platform_data *pdata = motg->pdata; int cnt = 0; @@ -543,7 +543,7 @@ static int msm_otg_suspend(struct msm_otg *motg) static int msm_otg_resume(struct msm_otg *motg) { - struct otg_transceiver *otg = &motg->otg; + struct usb_phy *otg = &motg->otg; struct usb_bus *bus = otg->host; int cnt = 0; unsigned temp; @@ -627,7 +627,7 @@ static void msm_otg_notify_charger(struct msm_otg *motg, unsigned mA) motg->cur_power = mA; } -static int msm_otg_set_power(struct otg_transceiver *otg, unsigned mA) +static int msm_otg_set_power(struct usb_phy *otg, unsigned mA) { struct msm_otg *motg = container_of(otg, struct msm_otg, otg); @@ -644,7 +644,7 @@ static int msm_otg_set_power(struct otg_transceiver *otg, unsigned mA) return 0; } -static void msm_otg_start_host(struct otg_transceiver *otg, int on) +static void msm_otg_start_host(struct usb_phy *otg, int on) { struct msm_otg *motg = container_of(otg, struct msm_otg, otg); struct msm_otg_platform_data *pdata = motg->pdata; @@ -683,7 +683,7 @@ static void msm_otg_start_host(struct otg_transceiver *otg, int on) } } -static int msm_otg_set_host(struct otg_transceiver *otg, struct usb_bus *host) +static int msm_otg_set_host(struct usb_phy *otg, struct usb_bus *host) { struct msm_otg *motg = container_of(otg, struct msm_otg, otg); struct usb_hcd *hcd; @@ -729,7 +729,7 @@ static int msm_otg_set_host(struct otg_transceiver *otg, struct usb_bus *host) return 0; } -static void msm_otg_start_peripheral(struct otg_transceiver *otg, int on) +static void msm_otg_start_peripheral(struct usb_phy *otg, int on) { struct msm_otg *motg = container_of(otg, struct msm_otg, otg); struct msm_otg_platform_data *pdata = motg->pdata; @@ -756,7 +756,7 @@ static void msm_otg_start_peripheral(struct otg_transceiver *otg, int on) } -static int msm_otg_set_peripheral(struct otg_transceiver *otg, +static int msm_otg_set_peripheral(struct usb_phy *otg, struct usb_gadget *gadget) { struct msm_otg *motg = container_of(otg, struct msm_otg, otg); @@ -800,7 +800,7 @@ static int msm_otg_set_peripheral(struct otg_transceiver *otg, static bool msm_chg_check_secondary_det(struct msm_otg *motg) { - struct otg_transceiver *otg = &motg->otg; + struct usb_phy *otg = &motg->otg; u32 chg_det; bool ret = false; @@ -821,7 +821,7 @@ static bool msm_chg_check_secondary_det(struct msm_otg *motg) static void msm_chg_enable_secondary_det(struct msm_otg *motg) { - struct otg_transceiver *otg = &motg->otg; + struct usb_phy *otg = &motg->otg; u32 chg_det; switch (motg->pdata->phy_type) { @@ -861,7 +861,7 @@ static void msm_chg_enable_secondary_det(struct msm_otg *motg) static bool msm_chg_check_primary_det(struct msm_otg *motg) { - struct otg_transceiver *otg = &motg->otg; + struct usb_phy *otg = &motg->otg; u32 chg_det; bool ret = false; @@ -882,7 +882,7 @@ static bool msm_chg_check_primary_det(struct msm_otg *motg) static void msm_chg_enable_primary_det(struct msm_otg *motg) { - struct otg_transceiver *otg = &motg->otg; + struct usb_phy *otg = &motg->otg; u32 chg_det; switch (motg->pdata->phy_type) { @@ -907,7 +907,7 @@ static void msm_chg_enable_primary_det(struct msm_otg *motg) static bool msm_chg_check_dcd(struct msm_otg *motg) { - struct otg_transceiver *otg = &motg->otg; + struct usb_phy *otg = &motg->otg; u32 line_state; bool ret = false; @@ -928,7 +928,7 @@ static bool msm_chg_check_dcd(struct msm_otg *motg) static void msm_chg_disable_dcd(struct msm_otg *motg) { - struct otg_transceiver *otg = &motg->otg; + struct usb_phy *otg = &motg->otg; u32 chg_det; switch (motg->pdata->phy_type) { @@ -947,7 +947,7 @@ static void msm_chg_disable_dcd(struct msm_otg *motg) static void msm_chg_enable_dcd(struct msm_otg *motg) { - struct otg_transceiver *otg = &motg->otg; + struct usb_phy *otg = &motg->otg; u32 chg_det; switch (motg->pdata->phy_type) { @@ -968,7 +968,7 @@ static void msm_chg_enable_dcd(struct msm_otg *motg) static void msm_chg_block_on(struct msm_otg *motg) { - struct otg_transceiver *otg = &motg->otg; + struct usb_phy *otg = &motg->otg; u32 func_ctrl, chg_det; /* put the controller in non-driving mode */ @@ -1003,7 +1003,7 @@ static void msm_chg_block_on(struct msm_otg *motg) static void msm_chg_block_off(struct msm_otg *motg) { - struct otg_transceiver *otg = &motg->otg; + struct usb_phy *otg = &motg->otg; u32 func_ctrl, chg_det; switch (motg->pdata->phy_type) { @@ -1038,7 +1038,7 @@ static void msm_chg_block_off(struct msm_otg *motg) static void msm_chg_detect_work(struct work_struct *w) { struct msm_otg *motg = container_of(w, struct msm_otg, chg_work.work); - struct otg_transceiver *otg = &motg->otg; + struct usb_phy *otg = &motg->otg; bool is_dcd, tmout, vout; unsigned long delay; @@ -1152,7 +1152,7 @@ static void msm_otg_init_sm(struct msm_otg *motg) static void msm_otg_sm_work(struct work_struct *w) { struct msm_otg *motg = container_of(w, struct msm_otg, sm_work); - struct otg_transceiver *otg = &motg->otg; + struct usb_phy *otg = &motg->otg; switch (otg->state) { case OTG_STATE_UNDEFINED: @@ -1243,7 +1243,7 @@ static void msm_otg_sm_work(struct work_struct *w) static irqreturn_t msm_otg_irq(int irq, void *data) { struct msm_otg *motg = data; - struct otg_transceiver *otg = &motg->otg; + struct usb_phy *otg = &motg->otg; u32 otgsc = 0; if (atomic_read(&motg->in_lpm)) { @@ -1281,7 +1281,7 @@ static irqreturn_t msm_otg_irq(int irq, void *data) static int msm_otg_mode_show(struct seq_file *s, void *unused) { struct msm_otg *motg = s->private; - struct otg_transceiver *otg = &motg->otg; + struct usb_phy *otg = &motg->otg; switch (otg->state) { case OTG_STATE_A_HOST: @@ -1309,7 +1309,7 @@ static ssize_t msm_otg_mode_write(struct file *file, const char __user *ubuf, struct seq_file *s = file->private_data; struct msm_otg *motg = s->private; char buf[16]; - struct otg_transceiver *otg = &motg->otg; + struct usb_phy *otg = &motg->otg; int status = count; enum usb_mode_type req_mode; @@ -1414,7 +1414,7 @@ static int __init msm_otg_probe(struct platform_device *pdev) int ret = 0; struct resource *res; struct msm_otg *motg; - struct otg_transceiver *otg; + struct usb_phy *otg; dev_info(&pdev->dev, "msm_otg probe\n"); if (!pdev->dev.platform_data) { @@ -1598,7 +1598,7 @@ free_motg: static int __devexit msm_otg_remove(struct platform_device *pdev) { struct msm_otg *motg = platform_get_drvdata(pdev); - struct otg_transceiver *otg = &motg->otg; + struct usb_phy *otg = &motg->otg; int cnt = 0; if (otg->host || otg->gadget) @@ -1660,7 +1660,7 @@ static int __devexit msm_otg_remove(struct platform_device *pdev) static int msm_otg_runtime_idle(struct device *dev) { struct msm_otg *motg = dev_get_drvdata(dev); - struct otg_transceiver *otg = &motg->otg; + struct usb_phy *otg = &motg->otg; dev_dbg(dev, "OTG runtime idle\n"); |