diff options
author | Kishon Vijay Abraham I <kishon@ti.com> | 2012-06-22 07:32:45 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-06-25 07:04:26 -0400 |
commit | 721002ec1dd55a52425455826af49cf8853b2d4f (patch) | |
tree | 41d990b5f1a14d9e7bda9258083ee2628bf736e1 /drivers/usb/otg | |
parent | 6b03b13336ee5d8da7bda8799c9ed990e3daedcc (diff) |
usb: otg: utils: rename function name in OTG utils
_transceiver() in otg.c is replaced with _phy. usb_set_transceiver is
replaced with usb_add_phy to make it similar to other usb standard
function names like usb_add_hcd.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/otg')
-rw-r--r-- | drivers/usb/otg/ab8500-usb.c | 4 | ||||
-rw-r--r-- | drivers/usb/otg/fsl_otg.c | 6 | ||||
-rw-r--r-- | drivers/usb/otg/gpio_vbus.c | 4 | ||||
-rw-r--r-- | drivers/usb/otg/isp1301_omap.c | 4 | ||||
-rw-r--r-- | drivers/usb/otg/msm_otg.c | 6 | ||||
-rw-r--r-- | drivers/usb/otg/mv_otg.c | 6 | ||||
-rw-r--r-- | drivers/usb/otg/nop-usb-xceiv.c | 4 | ||||
-rw-r--r-- | drivers/usb/otg/otg.c | 32 | ||||
-rw-r--r-- | drivers/usb/otg/twl4030-usb.c | 2 | ||||
-rw-r--r-- | drivers/usb/otg/twl6030-usb.c | 2 |
10 files changed, 35 insertions, 35 deletions
diff --git a/drivers/usb/otg/ab8500-usb.c b/drivers/usb/otg/ab8500-usb.c index a84af677dc59..672e28c81437 100644 --- a/drivers/usb/otg/ab8500-usb.c +++ b/drivers/usb/otg/ab8500-usb.c | |||
@@ -529,7 +529,7 @@ static int __devinit ab8500_usb_probe(struct platform_device *pdev) | |||
529 | if (err < 0) | 529 | if (err < 0) |
530 | goto fail0; | 530 | goto fail0; |
531 | 531 | ||
532 | err = usb_set_transceiver(&ab->phy); | 532 | err = usb_add_phy(&ab->phy); |
533 | if (err) { | 533 | if (err) { |
534 | dev_err(&pdev->dev, "Can't register transceiver\n"); | 534 | dev_err(&pdev->dev, "Can't register transceiver\n"); |
535 | goto fail1; | 535 | goto fail1; |
@@ -556,7 +556,7 @@ static int __devexit ab8500_usb_remove(struct platform_device *pdev) | |||
556 | 556 | ||
557 | cancel_work_sync(&ab->phy_dis_work); | 557 | cancel_work_sync(&ab->phy_dis_work); |
558 | 558 | ||
559 | usb_set_transceiver(NULL); | 559 | usb_add_phy(NULL); |
560 | 560 | ||
561 | ab8500_usb_host_phy_dis(ab); | 561 | ab8500_usb_host_phy_dis(ab); |
562 | ab8500_usb_peri_phy_dis(ab); | 562 | ab8500_usb_peri_phy_dis(ab); |
diff --git a/drivers/usb/otg/fsl_otg.c b/drivers/usb/otg/fsl_otg.c index be4a63e8302f..73561edd81de 100644 --- a/drivers/usb/otg/fsl_otg.c +++ b/drivers/usb/otg/fsl_otg.c | |||
@@ -806,7 +806,7 @@ static int fsl_otg_conf(struct platform_device *pdev) | |||
806 | fsl_otg_dev = fsl_otg_tc; | 806 | fsl_otg_dev = fsl_otg_tc; |
807 | 807 | ||
808 | /* Store the otg transceiver */ | 808 | /* Store the otg transceiver */ |
809 | status = usb_set_transceiver(&fsl_otg_tc->phy); | 809 | status = usb_add_phy(&fsl_otg_tc->phy); |
810 | if (status) { | 810 | if (status) { |
811 | pr_warn(FSL_OTG_NAME ": unable to register OTG transceiver.\n"); | 811 | pr_warn(FSL_OTG_NAME ": unable to register OTG transceiver.\n"); |
812 | goto err; | 812 | goto err; |
@@ -824,7 +824,7 @@ err: | |||
824 | int usb_otg_start(struct platform_device *pdev) | 824 | int usb_otg_start(struct platform_device *pdev) |
825 | { | 825 | { |
826 | struct fsl_otg *p_otg; | 826 | struct fsl_otg *p_otg; |
827 | struct usb_phy *otg_trans = usb_get_transceiver(); | 827 | struct usb_phy *otg_trans = usb_get_phy(); |
828 | struct otg_fsm *fsm; | 828 | struct otg_fsm *fsm; |
829 | int status; | 829 | int status; |
830 | struct resource *res; | 830 | struct resource *res; |
@@ -1134,7 +1134,7 @@ static int __devexit fsl_otg_remove(struct platform_device *pdev) | |||
1134 | { | 1134 | { |
1135 | struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data; | 1135 | struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data; |
1136 | 1136 | ||
1137 | usb_set_transceiver(NULL); | 1137 | usb_add_phy(NULL); |
1138 | free_irq(fsl_otg_dev->irq, fsl_otg_dev); | 1138 | free_irq(fsl_otg_dev->irq, fsl_otg_dev); |
1139 | 1139 | ||
1140 | iounmap((void *)usb_dr_regs); | 1140 | iounmap((void *)usb_dr_regs); |
diff --git a/drivers/usb/otg/gpio_vbus.c b/drivers/usb/otg/gpio_vbus.c index bde6298a9693..9b3c264cdb56 100644 --- a/drivers/usb/otg/gpio_vbus.c +++ b/drivers/usb/otg/gpio_vbus.c | |||
@@ -320,7 +320,7 @@ static int __init gpio_vbus_probe(struct platform_device *pdev) | |||
320 | } | 320 | } |
321 | 321 | ||
322 | /* only active when a gadget is registered */ | 322 | /* only active when a gadget is registered */ |
323 | err = usb_set_transceiver(&gpio_vbus->phy); | 323 | err = usb_add_phy(&gpio_vbus->phy); |
324 | if (err) { | 324 | if (err) { |
325 | dev_err(&pdev->dev, "can't register transceiver, err: %d\n", | 325 | dev_err(&pdev->dev, "can't register transceiver, err: %d\n", |
326 | err); | 326 | err); |
@@ -354,7 +354,7 @@ static int __exit gpio_vbus_remove(struct platform_device *pdev) | |||
354 | cancel_delayed_work_sync(&gpio_vbus->work); | 354 | cancel_delayed_work_sync(&gpio_vbus->work); |
355 | regulator_put(gpio_vbus->vbus_draw); | 355 | regulator_put(gpio_vbus->vbus_draw); |
356 | 356 | ||
357 | usb_set_transceiver(NULL); | 357 | usb_add_phy(NULL); |
358 | 358 | ||
359 | free_irq(gpio_vbus->irq, pdev); | 359 | free_irq(gpio_vbus->irq, pdev); |
360 | if (gpio_is_valid(pdata->gpio_pullup)) | 360 | if (gpio_is_valid(pdata->gpio_pullup)) |
diff --git a/drivers/usb/otg/isp1301_omap.c b/drivers/usb/otg/isp1301_omap.c index 33cd709b084e..b74df3fec56f 100644 --- a/drivers/usb/otg/isp1301_omap.c +++ b/drivers/usb/otg/isp1301_omap.c | |||
@@ -1611,7 +1611,7 @@ isp1301_probe(struct i2c_client *i2c, const struct i2c_device_id *id) | |||
1611 | dev_dbg(&i2c->dev, "scheduled timer, %d min\n", TIMER_MINUTES); | 1611 | dev_dbg(&i2c->dev, "scheduled timer, %d min\n", TIMER_MINUTES); |
1612 | #endif | 1612 | #endif |
1613 | 1613 | ||
1614 | status = usb_set_transceiver(&isp->phy); | 1614 | status = usb_add_phy(&isp->phy); |
1615 | if (status < 0) | 1615 | if (status < 0) |
1616 | dev_err(&i2c->dev, "can't register transceiver, %d\n", | 1616 | dev_err(&i2c->dev, "can't register transceiver, %d\n", |
1617 | status); | 1617 | status); |
@@ -1650,7 +1650,7 @@ subsys_initcall(isp_init); | |||
1650 | static void __exit isp_exit(void) | 1650 | static void __exit isp_exit(void) |
1651 | { | 1651 | { |
1652 | if (the_transceiver) | 1652 | if (the_transceiver) |
1653 | usb_set_transceiver(NULL); | 1653 | usb_add_phy(NULL); |
1654 | i2c_del_driver(&isp1301_driver); | 1654 | i2c_del_driver(&isp1301_driver); |
1655 | } | 1655 | } |
1656 | module_exit(isp_exit); | 1656 | module_exit(isp_exit); |
diff --git a/drivers/usb/otg/msm_otg.c b/drivers/usb/otg/msm_otg.c index 1d0347c247d1..dd606c010035 100644 --- a/drivers/usb/otg/msm_otg.c +++ b/drivers/usb/otg/msm_otg.c | |||
@@ -1555,9 +1555,9 @@ static int __init msm_otg_probe(struct platform_device *pdev) | |||
1555 | phy->otg->set_host = msm_otg_set_host; | 1555 | phy->otg->set_host = msm_otg_set_host; |
1556 | phy->otg->set_peripheral = msm_otg_set_peripheral; | 1556 | phy->otg->set_peripheral = msm_otg_set_peripheral; |
1557 | 1557 | ||
1558 | ret = usb_set_transceiver(&motg->phy); | 1558 | ret = usb_add_phy(&motg->phy); |
1559 | if (ret) { | 1559 | if (ret) { |
1560 | dev_err(&pdev->dev, "usb_set_transceiver failed\n"); | 1560 | dev_err(&pdev->dev, "usb_add_phy failed\n"); |
1561 | goto free_irq; | 1561 | goto free_irq; |
1562 | } | 1562 | } |
1563 | 1563 | ||
@@ -1624,7 +1624,7 @@ static int __devexit msm_otg_remove(struct platform_device *pdev) | |||
1624 | device_init_wakeup(&pdev->dev, 0); | 1624 | device_init_wakeup(&pdev->dev, 0); |
1625 | pm_runtime_disable(&pdev->dev); | 1625 | pm_runtime_disable(&pdev->dev); |
1626 | 1626 | ||
1627 | usb_set_transceiver(NULL); | 1627 | usb_add_phy(NULL); |
1628 | free_irq(motg->irq, motg); | 1628 | free_irq(motg->irq, motg); |
1629 | 1629 | ||
1630 | /* | 1630 | /* |
diff --git a/drivers/usb/otg/mv_otg.c b/drivers/usb/otg/mv_otg.c index 6cc6c3ffbb83..18e90fe1fbd1 100644 --- a/drivers/usb/otg/mv_otg.c +++ b/drivers/usb/otg/mv_otg.c | |||
@@ -690,7 +690,7 @@ int mv_otg_remove(struct platform_device *pdev) | |||
690 | for (clk_i = 0; clk_i <= mvotg->clknum; clk_i++) | 690 | for (clk_i = 0; clk_i <= mvotg->clknum; clk_i++) |
691 | clk_put(mvotg->clk[clk_i]); | 691 | clk_put(mvotg->clk[clk_i]); |
692 | 692 | ||
693 | usb_set_transceiver(NULL); | 693 | usb_add_phy(NULL); |
694 | platform_set_drvdata(pdev, NULL); | 694 | platform_set_drvdata(pdev, NULL); |
695 | 695 | ||
696 | kfree(mvotg->phy.otg); | 696 | kfree(mvotg->phy.otg); |
@@ -853,7 +853,7 @@ static int mv_otg_probe(struct platform_device *pdev) | |||
853 | goto err_disable_clk; | 853 | goto err_disable_clk; |
854 | } | 854 | } |
855 | 855 | ||
856 | retval = usb_set_transceiver(&mvotg->phy); | 856 | retval = usb_add_phy(&mvotg->phy); |
857 | if (retval < 0) { | 857 | if (retval < 0) { |
858 | dev_err(&pdev->dev, "can't register transceiver, %d\n", | 858 | dev_err(&pdev->dev, "can't register transceiver, %d\n", |
859 | retval); | 859 | retval); |
@@ -880,7 +880,7 @@ static int mv_otg_probe(struct platform_device *pdev) | |||
880 | return 0; | 880 | return 0; |
881 | 881 | ||
882 | err_set_transceiver: | 882 | err_set_transceiver: |
883 | usb_set_transceiver(NULL); | 883 | usb_add_phy(NULL); |
884 | err_free_irq: | 884 | err_free_irq: |
885 | free_irq(mvotg->irq, mvotg); | 885 | free_irq(mvotg->irq, mvotg); |
886 | err_disable_clk: | 886 | err_disable_clk: |
diff --git a/drivers/usb/otg/nop-usb-xceiv.c b/drivers/usb/otg/nop-usb-xceiv.c index 58b26df6afd1..33000dae7200 100644 --- a/drivers/usb/otg/nop-usb-xceiv.c +++ b/drivers/usb/otg/nop-usb-xceiv.c | |||
@@ -117,7 +117,7 @@ static int __devinit nop_usb_xceiv_probe(struct platform_device *pdev) | |||
117 | nop->phy.otg->set_host = nop_set_host; | 117 | nop->phy.otg->set_host = nop_set_host; |
118 | nop->phy.otg->set_peripheral = nop_set_peripheral; | 118 | nop->phy.otg->set_peripheral = nop_set_peripheral; |
119 | 119 | ||
120 | err = usb_set_transceiver(&nop->phy); | 120 | err = usb_add_phy(&nop->phy); |
121 | if (err) { | 121 | if (err) { |
122 | dev_err(&pdev->dev, "can't register transceiver, err: %d\n", | 122 | dev_err(&pdev->dev, "can't register transceiver, err: %d\n", |
123 | err); | 123 | err); |
@@ -139,7 +139,7 @@ static int __devexit nop_usb_xceiv_remove(struct platform_device *pdev) | |||
139 | { | 139 | { |
140 | struct nop_usb_xceiv *nop = platform_get_drvdata(pdev); | 140 | struct nop_usb_xceiv *nop = platform_get_drvdata(pdev); |
141 | 141 | ||
142 | usb_set_transceiver(NULL); | 142 | usb_add_phy(NULL); |
143 | 143 | ||
144 | platform_set_drvdata(pdev, NULL); | 144 | platform_set_drvdata(pdev, NULL); |
145 | kfree(nop->phy.otg); | 145 | kfree(nop->phy.otg); |
diff --git a/drivers/usb/otg/otg.c b/drivers/usb/otg/otg.c index 801e597a1541..300a995cfdbe 100644 --- a/drivers/usb/otg/otg.c +++ b/drivers/usb/otg/otg.c | |||
@@ -18,53 +18,53 @@ | |||
18 | static struct usb_phy *phy; | 18 | static struct usb_phy *phy; |
19 | 19 | ||
20 | /** | 20 | /** |
21 | * usb_get_transceiver - find the (single) USB transceiver | 21 | * usb_get_phy - find the (single) USB PHY |
22 | * | 22 | * |
23 | * Returns the transceiver driver, after getting a refcount to it; or | 23 | * Returns the phy driver, after getting a refcount to it; or |
24 | * null if there is no such transceiver. The caller is responsible for | 24 | * null if there is no such phy. The caller is responsible for |
25 | * calling usb_put_transceiver() to release that count. | 25 | * calling usb_put_phy() to release that count. |
26 | * | 26 | * |
27 | * For use by USB host and peripheral drivers. | 27 | * For use by USB host and peripheral drivers. |
28 | */ | 28 | */ |
29 | struct usb_phy *usb_get_transceiver(void) | 29 | struct usb_phy *usb_get_phy(void) |
30 | { | 30 | { |
31 | if (phy) | 31 | if (phy) |
32 | get_device(phy->dev); | 32 | get_device(phy->dev); |
33 | return phy; | 33 | return phy; |
34 | } | 34 | } |
35 | EXPORT_SYMBOL(usb_get_transceiver); | 35 | EXPORT_SYMBOL(usb_get_phy); |
36 | 36 | ||
37 | /** | 37 | /** |
38 | * usb_put_transceiver - release the (single) USB transceiver | 38 | * usb_put_phy - release the (single) USB PHY |
39 | * @x: the transceiver returned by usb_get_transceiver() | 39 | * @x: the phy returned by usb_get_phy() |
40 | * | 40 | * |
41 | * Releases a refcount the caller received from usb_get_transceiver(). | 41 | * Releases a refcount the caller received from usb_get_phy(). |
42 | * | 42 | * |
43 | * For use by USB host and peripheral drivers. | 43 | * For use by USB host and peripheral drivers. |
44 | */ | 44 | */ |
45 | void usb_put_transceiver(struct usb_phy *x) | 45 | void usb_put_phy(struct usb_phy *x) |
46 | { | 46 | { |
47 | if (x) | 47 | if (x) |
48 | put_device(x->dev); | 48 | put_device(x->dev); |
49 | } | 49 | } |
50 | EXPORT_SYMBOL(usb_put_transceiver); | 50 | EXPORT_SYMBOL(usb_put_phy); |
51 | 51 | ||
52 | /** | 52 | /** |
53 | * usb_set_transceiver - declare the (single) USB transceiver | 53 | * usb_add_phy - declare the (single) USB PHY |
54 | * @x: the USB transceiver to be used; or NULL | 54 | * @x: the USB phy to be used; or NULL |
55 | * | 55 | * |
56 | * This call is exclusively for use by transceiver drivers, which | 56 | * This call is exclusively for use by phy drivers, which |
57 | * coordinate the activities of drivers for host and peripheral | 57 | * coordinate the activities of drivers for host and peripheral |
58 | * controllers, and in some cases for VBUS current regulation. | 58 | * controllers, and in some cases for VBUS current regulation. |
59 | */ | 59 | */ |
60 | int usb_set_transceiver(struct usb_phy *x) | 60 | int usb_add_phy(struct usb_phy *x) |
61 | { | 61 | { |
62 | if (phy && x) | 62 | if (phy && x) |
63 | return -EBUSY; | 63 | return -EBUSY; |
64 | phy = x; | 64 | phy = x; |
65 | return 0; | 65 | return 0; |
66 | } | 66 | } |
67 | EXPORT_SYMBOL(usb_set_transceiver); | 67 | EXPORT_SYMBOL(usb_add_phy); |
68 | 68 | ||
69 | const char *otg_state_string(enum usb_otg_state state) | 69 | const char *otg_state_string(enum usb_otg_state state) |
70 | { | 70 | { |
diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c index 02979306bf83..01022c891e26 100644 --- a/drivers/usb/otg/twl4030-usb.c +++ b/drivers/usb/otg/twl4030-usb.c | |||
@@ -633,7 +633,7 @@ static int __devinit twl4030_usb_probe(struct platform_device *pdev) | |||
633 | kfree(twl); | 633 | kfree(twl); |
634 | return err; | 634 | return err; |
635 | } | 635 | } |
636 | usb_set_transceiver(&twl->phy); | 636 | usb_add_phy(&twl->phy); |
637 | 637 | ||
638 | platform_set_drvdata(pdev, twl); | 638 | platform_set_drvdata(pdev, twl); |
639 | if (device_create_file(&pdev->dev, &dev_attr_vbus)) | 639 | if (device_create_file(&pdev->dev, &dev_attr_vbus)) |
diff --git a/drivers/usb/otg/twl6030-usb.c b/drivers/usb/otg/twl6030-usb.c index d2a9a8e691b9..a8be20878eb9 100644 --- a/drivers/usb/otg/twl6030-usb.c +++ b/drivers/usb/otg/twl6030-usb.c | |||
@@ -443,7 +443,7 @@ static int __devinit twl6030_usb_probe(struct platform_device *pdev) | |||
443 | kfree(twl); | 443 | kfree(twl); |
444 | return err; | 444 | return err; |
445 | } | 445 | } |
446 | usb_set_transceiver(&twl->phy); | 446 | usb_add_phy(&twl->phy); |
447 | 447 | ||
448 | platform_set_drvdata(pdev, twl); | 448 | platform_set_drvdata(pdev, twl); |
449 | if (device_create_file(&pdev->dev, &dev_attr_vbus)) | 449 | if (device_create_file(&pdev->dev, &dev_attr_vbus)) |