diff options
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) | |||
235 | return ret < 0 ? ret : 0; | 235 | return ret < 0 ? ret : 0; |
236 | } | 236 | } |
237 | 237 | ||
238 | static int ulpi_read(struct otg_transceiver *otg, u32 reg) | 238 | static int ulpi_read(struct usb_phy *otg, u32 reg) |
239 | { | 239 | { |
240 | struct msm_otg *motg = container_of(otg, struct msm_otg, otg); | 240 | struct msm_otg *motg = container_of(otg, struct msm_otg, otg); |
241 | int cnt = 0; | 241 | int cnt = 0; |
@@ -260,7 +260,7 @@ static int ulpi_read(struct otg_transceiver *otg, u32 reg) | |||
260 | return ULPI_DATA_READ(readl(USB_ULPI_VIEWPORT)); | 260 | return ULPI_DATA_READ(readl(USB_ULPI_VIEWPORT)); |
261 | } | 261 | } |
262 | 262 | ||
263 | static int ulpi_write(struct otg_transceiver *otg, u32 val, u32 reg) | 263 | static int ulpi_write(struct usb_phy *otg, u32 val, u32 reg) |
264 | { | 264 | { |
265 | struct msm_otg *motg = container_of(otg, struct msm_otg, otg); | 265 | struct msm_otg *motg = container_of(otg, struct msm_otg, otg); |
266 | int cnt = 0; | 266 | int cnt = 0; |
@@ -390,7 +390,7 @@ static int msm_otg_phy_reset(struct msm_otg *motg) | |||
390 | } | 390 | } |
391 | 391 | ||
392 | #define LINK_RESET_TIMEOUT_USEC (250 * 1000) | 392 | #define LINK_RESET_TIMEOUT_USEC (250 * 1000) |
393 | static int msm_otg_reset(struct otg_transceiver *otg) | 393 | static int msm_otg_reset(struct usb_phy *otg) |
394 | { | 394 | { |
395 | struct msm_otg *motg = container_of(otg, struct msm_otg, otg); | 395 | struct msm_otg *motg = container_of(otg, struct msm_otg, otg); |
396 | struct msm_otg_platform_data *pdata = motg->pdata; | 396 | struct msm_otg_platform_data *pdata = motg->pdata; |
@@ -448,7 +448,7 @@ static int msm_otg_reset(struct otg_transceiver *otg) | |||
448 | #ifdef CONFIG_PM_SLEEP | 448 | #ifdef CONFIG_PM_SLEEP |
449 | static int msm_otg_suspend(struct msm_otg *motg) | 449 | static int msm_otg_suspend(struct msm_otg *motg) |
450 | { | 450 | { |
451 | struct otg_transceiver *otg = &motg->otg; | 451 | struct usb_phy *otg = &motg->otg; |
452 | struct usb_bus *bus = otg->host; | 452 | struct usb_bus *bus = otg->host; |
453 | struct msm_otg_platform_data *pdata = motg->pdata; | 453 | struct msm_otg_platform_data *pdata = motg->pdata; |
454 | int cnt = 0; | 454 | int cnt = 0; |
@@ -543,7 +543,7 @@ static int msm_otg_suspend(struct msm_otg *motg) | |||
543 | 543 | ||
544 | static int msm_otg_resume(struct msm_otg *motg) | 544 | static int msm_otg_resume(struct msm_otg *motg) |
545 | { | 545 | { |
546 | struct otg_transceiver *otg = &motg->otg; | 546 | struct usb_phy *otg = &motg->otg; |
547 | struct usb_bus *bus = otg->host; | 547 | struct usb_bus *bus = otg->host; |
548 | int cnt = 0; | 548 | int cnt = 0; |
549 | unsigned temp; | 549 | unsigned temp; |
@@ -627,7 +627,7 @@ static void msm_otg_notify_charger(struct msm_otg *motg, unsigned mA) | |||
627 | motg->cur_power = mA; | 627 | motg->cur_power = mA; |
628 | } | 628 | } |
629 | 629 | ||
630 | static int msm_otg_set_power(struct otg_transceiver *otg, unsigned mA) | 630 | static int msm_otg_set_power(struct usb_phy *otg, unsigned mA) |
631 | { | 631 | { |
632 | struct msm_otg *motg = container_of(otg, struct msm_otg, otg); | 632 | struct msm_otg *motg = container_of(otg, struct msm_otg, otg); |
633 | 633 | ||
@@ -644,7 +644,7 @@ static int msm_otg_set_power(struct otg_transceiver *otg, unsigned mA) | |||
644 | return 0; | 644 | return 0; |
645 | } | 645 | } |
646 | 646 | ||
647 | static void msm_otg_start_host(struct otg_transceiver *otg, int on) | 647 | static void msm_otg_start_host(struct usb_phy *otg, int on) |
648 | { | 648 | { |
649 | struct msm_otg *motg = container_of(otg, struct msm_otg, otg); | 649 | struct msm_otg *motg = container_of(otg, struct msm_otg, otg); |
650 | struct msm_otg_platform_data *pdata = motg->pdata; | 650 | struct msm_otg_platform_data *pdata = motg->pdata; |
@@ -683,7 +683,7 @@ static void msm_otg_start_host(struct otg_transceiver *otg, int on) | |||
683 | } | 683 | } |
684 | } | 684 | } |
685 | 685 | ||
686 | static int msm_otg_set_host(struct otg_transceiver *otg, struct usb_bus *host) | 686 | static int msm_otg_set_host(struct usb_phy *otg, struct usb_bus *host) |
687 | { | 687 | { |
688 | struct msm_otg *motg = container_of(otg, struct msm_otg, otg); | 688 | struct msm_otg *motg = container_of(otg, struct msm_otg, otg); |
689 | struct usb_hcd *hcd; | 689 | struct usb_hcd *hcd; |
@@ -729,7 +729,7 @@ static int msm_otg_set_host(struct otg_transceiver *otg, struct usb_bus *host) | |||
729 | return 0; | 729 | return 0; |
730 | } | 730 | } |
731 | 731 | ||
732 | static void msm_otg_start_peripheral(struct otg_transceiver *otg, int on) | 732 | static void msm_otg_start_peripheral(struct usb_phy *otg, int on) |
733 | { | 733 | { |
734 | struct msm_otg *motg = container_of(otg, struct msm_otg, otg); | 734 | struct msm_otg *motg = container_of(otg, struct msm_otg, otg); |
735 | struct msm_otg_platform_data *pdata = motg->pdata; | 735 | struct msm_otg_platform_data *pdata = motg->pdata; |
@@ -756,7 +756,7 @@ static void msm_otg_start_peripheral(struct otg_transceiver *otg, int on) | |||
756 | 756 | ||
757 | } | 757 | } |
758 | 758 | ||
759 | static int msm_otg_set_peripheral(struct otg_transceiver *otg, | 759 | static int msm_otg_set_peripheral(struct usb_phy *otg, |
760 | struct usb_gadget *gadget) | 760 | struct usb_gadget *gadget) |
761 | { | 761 | { |
762 | struct msm_otg *motg = container_of(otg, struct msm_otg, otg); | 762 | 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, | |||
800 | 800 | ||
801 | static bool msm_chg_check_secondary_det(struct msm_otg *motg) | 801 | static bool msm_chg_check_secondary_det(struct msm_otg *motg) |
802 | { | 802 | { |
803 | struct otg_transceiver *otg = &motg->otg; | 803 | struct usb_phy *otg = &motg->otg; |
804 | u32 chg_det; | 804 | u32 chg_det; |
805 | bool ret = false; | 805 | bool ret = false; |
806 | 806 | ||
@@ -821,7 +821,7 @@ static bool msm_chg_check_secondary_det(struct msm_otg *motg) | |||
821 | 821 | ||
822 | static void msm_chg_enable_secondary_det(struct msm_otg *motg) | 822 | static void msm_chg_enable_secondary_det(struct msm_otg *motg) |
823 | { | 823 | { |
824 | struct otg_transceiver *otg = &motg->otg; | 824 | struct usb_phy *otg = &motg->otg; |
825 | u32 chg_det; | 825 | u32 chg_det; |
826 | 826 | ||
827 | switch (motg->pdata->phy_type) { | 827 | switch (motg->pdata->phy_type) { |
@@ -861,7 +861,7 @@ static void msm_chg_enable_secondary_det(struct msm_otg *motg) | |||
861 | 861 | ||
862 | static bool msm_chg_check_primary_det(struct msm_otg *motg) | 862 | static bool msm_chg_check_primary_det(struct msm_otg *motg) |
863 | { | 863 | { |
864 | struct otg_transceiver *otg = &motg->otg; | 864 | struct usb_phy *otg = &motg->otg; |
865 | u32 chg_det; | 865 | u32 chg_det; |
866 | bool ret = false; | 866 | bool ret = false; |
867 | 867 | ||
@@ -882,7 +882,7 @@ static bool msm_chg_check_primary_det(struct msm_otg *motg) | |||
882 | 882 | ||
883 | static void msm_chg_enable_primary_det(struct msm_otg *motg) | 883 | static void msm_chg_enable_primary_det(struct msm_otg *motg) |
884 | { | 884 | { |
885 | struct otg_transceiver *otg = &motg->otg; | 885 | struct usb_phy *otg = &motg->otg; |
886 | u32 chg_det; | 886 | u32 chg_det; |
887 | 887 | ||
888 | switch (motg->pdata->phy_type) { | 888 | switch (motg->pdata->phy_type) { |
@@ -907,7 +907,7 @@ static void msm_chg_enable_primary_det(struct msm_otg *motg) | |||
907 | 907 | ||
908 | static bool msm_chg_check_dcd(struct msm_otg *motg) | 908 | static bool msm_chg_check_dcd(struct msm_otg *motg) |
909 | { | 909 | { |
910 | struct otg_transceiver *otg = &motg->otg; | 910 | struct usb_phy *otg = &motg->otg; |
911 | u32 line_state; | 911 | u32 line_state; |
912 | bool ret = false; | 912 | bool ret = false; |
913 | 913 | ||
@@ -928,7 +928,7 @@ static bool msm_chg_check_dcd(struct msm_otg *motg) | |||
928 | 928 | ||
929 | static void msm_chg_disable_dcd(struct msm_otg *motg) | 929 | static void msm_chg_disable_dcd(struct msm_otg *motg) |
930 | { | 930 | { |
931 | struct otg_transceiver *otg = &motg->otg; | 931 | struct usb_phy *otg = &motg->otg; |
932 | u32 chg_det; | 932 | u32 chg_det; |
933 | 933 | ||
934 | switch (motg->pdata->phy_type) { | 934 | switch (motg->pdata->phy_type) { |
@@ -947,7 +947,7 @@ static void msm_chg_disable_dcd(struct msm_otg *motg) | |||
947 | 947 | ||
948 | static void msm_chg_enable_dcd(struct msm_otg *motg) | 948 | static void msm_chg_enable_dcd(struct msm_otg *motg) |
949 | { | 949 | { |
950 | struct otg_transceiver *otg = &motg->otg; | 950 | struct usb_phy *otg = &motg->otg; |
951 | u32 chg_det; | 951 | u32 chg_det; |
952 | 952 | ||
953 | switch (motg->pdata->phy_type) { | 953 | switch (motg->pdata->phy_type) { |
@@ -968,7 +968,7 @@ static void msm_chg_enable_dcd(struct msm_otg *motg) | |||
968 | 968 | ||
969 | static void msm_chg_block_on(struct msm_otg *motg) | 969 | static void msm_chg_block_on(struct msm_otg *motg) |
970 | { | 970 | { |
971 | struct otg_transceiver *otg = &motg->otg; | 971 | struct usb_phy *otg = &motg->otg; |
972 | u32 func_ctrl, chg_det; | 972 | u32 func_ctrl, chg_det; |
973 | 973 | ||
974 | /* put the controller in non-driving mode */ | 974 | /* put the controller in non-driving mode */ |
@@ -1003,7 +1003,7 @@ static void msm_chg_block_on(struct msm_otg *motg) | |||
1003 | 1003 | ||
1004 | static void msm_chg_block_off(struct msm_otg *motg) | 1004 | static void msm_chg_block_off(struct msm_otg *motg) |
1005 | { | 1005 | { |
1006 | struct otg_transceiver *otg = &motg->otg; | 1006 | struct usb_phy *otg = &motg->otg; |
1007 | u32 func_ctrl, chg_det; | 1007 | u32 func_ctrl, chg_det; |
1008 | 1008 | ||
1009 | switch (motg->pdata->phy_type) { | 1009 | switch (motg->pdata->phy_type) { |
@@ -1038,7 +1038,7 @@ static void msm_chg_block_off(struct msm_otg *motg) | |||
1038 | static void msm_chg_detect_work(struct work_struct *w) | 1038 | static void msm_chg_detect_work(struct work_struct *w) |
1039 | { | 1039 | { |
1040 | struct msm_otg *motg = container_of(w, struct msm_otg, chg_work.work); | 1040 | struct msm_otg *motg = container_of(w, struct msm_otg, chg_work.work); |
1041 | struct otg_transceiver *otg = &motg->otg; | 1041 | struct usb_phy *otg = &motg->otg; |
1042 | bool is_dcd, tmout, vout; | 1042 | bool is_dcd, tmout, vout; |
1043 | unsigned long delay; | 1043 | unsigned long delay; |
1044 | 1044 | ||
@@ -1152,7 +1152,7 @@ static void msm_otg_init_sm(struct msm_otg *motg) | |||
1152 | static void msm_otg_sm_work(struct work_struct *w) | 1152 | static void msm_otg_sm_work(struct work_struct *w) |
1153 | { | 1153 | { |
1154 | struct msm_otg *motg = container_of(w, struct msm_otg, sm_work); | 1154 | struct msm_otg *motg = container_of(w, struct msm_otg, sm_work); |
1155 | struct otg_transceiver *otg = &motg->otg; | 1155 | struct usb_phy *otg = &motg->otg; |
1156 | 1156 | ||
1157 | switch (otg->state) { | 1157 | switch (otg->state) { |
1158 | case OTG_STATE_UNDEFINED: | 1158 | case OTG_STATE_UNDEFINED: |
@@ -1243,7 +1243,7 @@ static void msm_otg_sm_work(struct work_struct *w) | |||
1243 | static irqreturn_t msm_otg_irq(int irq, void *data) | 1243 | static irqreturn_t msm_otg_irq(int irq, void *data) |
1244 | { | 1244 | { |
1245 | struct msm_otg *motg = data; | 1245 | struct msm_otg *motg = data; |
1246 | struct otg_transceiver *otg = &motg->otg; | 1246 | struct usb_phy *otg = &motg->otg; |
1247 | u32 otgsc = 0; | 1247 | u32 otgsc = 0; |
1248 | 1248 | ||
1249 | if (atomic_read(&motg->in_lpm)) { | 1249 | if (atomic_read(&motg->in_lpm)) { |
@@ -1281,7 +1281,7 @@ static irqreturn_t msm_otg_irq(int irq, void *data) | |||
1281 | static int msm_otg_mode_show(struct seq_file *s, void *unused) | 1281 | static int msm_otg_mode_show(struct seq_file *s, void *unused) |
1282 | { | 1282 | { |
1283 | struct msm_otg *motg = s->private; | 1283 | struct msm_otg *motg = s->private; |
1284 | struct otg_transceiver *otg = &motg->otg; | 1284 | struct usb_phy *otg = &motg->otg; |
1285 | 1285 | ||
1286 | switch (otg->state) { | 1286 | switch (otg->state) { |
1287 | case OTG_STATE_A_HOST: | 1287 | case OTG_STATE_A_HOST: |
@@ -1309,7 +1309,7 @@ static ssize_t msm_otg_mode_write(struct file *file, const char __user *ubuf, | |||
1309 | struct seq_file *s = file->private_data; | 1309 | struct seq_file *s = file->private_data; |
1310 | struct msm_otg *motg = s->private; | 1310 | struct msm_otg *motg = s->private; |
1311 | char buf[16]; | 1311 | char buf[16]; |
1312 | struct otg_transceiver *otg = &motg->otg; | 1312 | struct usb_phy *otg = &motg->otg; |
1313 | int status = count; | 1313 | int status = count; |
1314 | enum usb_mode_type req_mode; | 1314 | enum usb_mode_type req_mode; |
1315 | 1315 | ||
@@ -1414,7 +1414,7 @@ static int __init msm_otg_probe(struct platform_device *pdev) | |||
1414 | int ret = 0; | 1414 | int ret = 0; |
1415 | struct resource *res; | 1415 | struct resource *res; |
1416 | struct msm_otg *motg; | 1416 | struct msm_otg *motg; |
1417 | struct otg_transceiver *otg; | 1417 | struct usb_phy *otg; |
1418 | 1418 | ||
1419 | dev_info(&pdev->dev, "msm_otg probe\n"); | 1419 | dev_info(&pdev->dev, "msm_otg probe\n"); |
1420 | if (!pdev->dev.platform_data) { | 1420 | if (!pdev->dev.platform_data) { |
@@ -1598,7 +1598,7 @@ free_motg: | |||
1598 | static int __devexit msm_otg_remove(struct platform_device *pdev) | 1598 | static int __devexit msm_otg_remove(struct platform_device *pdev) |
1599 | { | 1599 | { |
1600 | struct msm_otg *motg = platform_get_drvdata(pdev); | 1600 | struct msm_otg *motg = platform_get_drvdata(pdev); |
1601 | struct otg_transceiver *otg = &motg->otg; | 1601 | struct usb_phy *otg = &motg->otg; |
1602 | int cnt = 0; | 1602 | int cnt = 0; |
1603 | 1603 | ||
1604 | if (otg->host || otg->gadget) | 1604 | if (otg->host || otg->gadget) |
@@ -1660,7 +1660,7 @@ static int __devexit msm_otg_remove(struct platform_device *pdev) | |||
1660 | static int msm_otg_runtime_idle(struct device *dev) | 1660 | static int msm_otg_runtime_idle(struct device *dev) |
1661 | { | 1661 | { |
1662 | struct msm_otg *motg = dev_get_drvdata(dev); | 1662 | struct msm_otg *motg = dev_get_drvdata(dev); |
1663 | struct otg_transceiver *otg = &motg->otg; | 1663 | struct usb_phy *otg = &motg->otg; |
1664 | 1664 | ||
1665 | dev_dbg(dev, "OTG runtime idle\n"); | 1665 | dev_dbg(dev, "OTG runtime idle\n"); |
1666 | 1666 | ||