aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/phy/phy-generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/phy/phy-generic.c')
-rw-r--r--drivers/usb/phy/phy-generic.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c
index 95e70bc384c2..e76ca4ca3a8a 100644
--- a/drivers/usb/phy/phy-generic.c
+++ b/drivers/usb/phy/phy-generic.c
@@ -43,32 +43,32 @@
43 43
44static struct platform_device *pd; 44static struct platform_device *pd;
45 45
46void usb_nop_xceiv_register(void) 46void usb_phy_generic_register(void)
47{ 47{
48 if (pd) 48 if (pd)
49 return; 49 return;
50 pd = platform_device_register_simple("usb_phy_gen_xceiv", -1, NULL, 0); 50 pd = platform_device_register_simple("usb_phy_generic", -1, NULL, 0);
51 if (IS_ERR(pd)) { 51 if (IS_ERR(pd)) {
52 pr_err("Unable to register generic usb transceiver\n"); 52 pr_err("Unable to register generic usb transceiver\n");
53 pd = NULL; 53 pd = NULL;
54 return; 54 return;
55 } 55 }
56} 56}
57EXPORT_SYMBOL_GPL(usb_nop_xceiv_register); 57EXPORT_SYMBOL_GPL(usb_phy_generic_register);
58 58
59void usb_nop_xceiv_unregister(void) 59void usb_phy_generic_unregister(void)
60{ 60{
61 platform_device_unregister(pd); 61 platform_device_unregister(pd);
62 pd = NULL; 62 pd = NULL;
63} 63}
64EXPORT_SYMBOL_GPL(usb_nop_xceiv_unregister); 64EXPORT_SYMBOL_GPL(usb_phy_generic_unregister);
65 65
66static int nop_set_suspend(struct usb_phy *x, int suspend) 66static int nop_set_suspend(struct usb_phy *x, int suspend)
67{ 67{
68 return 0; 68 return 0;
69} 69}
70 70
71static void nop_reset_set(struct usb_phy_gen_xceiv *nop, int asserted) 71static void nop_reset_set(struct usb_phy_generic *nop, int asserted)
72{ 72{
73 int value; 73 int value;
74 74
@@ -87,7 +87,7 @@ static void nop_reset_set(struct usb_phy_gen_xceiv *nop, int asserted)
87 87
88int usb_gen_phy_init(struct usb_phy *phy) 88int usb_gen_phy_init(struct usb_phy *phy)
89{ 89{
90 struct usb_phy_gen_xceiv *nop = dev_get_drvdata(phy->dev); 90 struct usb_phy_generic *nop = dev_get_drvdata(phy->dev);
91 91
92 if (!IS_ERR(nop->vcc)) { 92 if (!IS_ERR(nop->vcc)) {
93 if (regulator_enable(nop->vcc)) 93 if (regulator_enable(nop->vcc))
@@ -106,7 +106,7 @@ EXPORT_SYMBOL_GPL(usb_gen_phy_init);
106 106
107void usb_gen_phy_shutdown(struct usb_phy *phy) 107void usb_gen_phy_shutdown(struct usb_phy *phy)
108{ 108{
109 struct usb_phy_gen_xceiv *nop = dev_get_drvdata(phy->dev); 109 struct usb_phy_generic *nop = dev_get_drvdata(phy->dev);
110 110
111 /* Assert RESET */ 111 /* Assert RESET */
112 nop_reset_set(nop, 1); 112 nop_reset_set(nop, 1);
@@ -150,8 +150,8 @@ static int nop_set_host(struct usb_otg *otg, struct usb_bus *host)
150 return 0; 150 return 0;
151} 151}
152 152
153int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_gen_xceiv *nop, 153int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop,
154 struct usb_phy_gen_xceiv_platform_data *pdata) 154 struct usb_phy_generic_platform_data *pdata)
155{ 155{
156 enum usb_phy_type type = USB_PHY_TYPE_USB2; 156 enum usb_phy_type type = USB_PHY_TYPE_USB2;
157 int err; 157 int err;
@@ -245,10 +245,10 @@ int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_gen_xceiv *nop,
245} 245}
246EXPORT_SYMBOL_GPL(usb_phy_gen_create_phy); 246EXPORT_SYMBOL_GPL(usb_phy_gen_create_phy);
247 247
248static int usb_phy_gen_xceiv_probe(struct platform_device *pdev) 248static int usb_phy_generic_probe(struct platform_device *pdev)
249{ 249{
250 struct device *dev = &pdev->dev; 250 struct device *dev = &pdev->dev;
251 struct usb_phy_gen_xceiv *nop; 251 struct usb_phy_generic *nop;
252 int err; 252 int err;
253 253
254 nop = devm_kzalloc(dev, sizeof(*nop), GFP_KERNEL); 254 nop = devm_kzalloc(dev, sizeof(*nop), GFP_KERNEL);
@@ -274,9 +274,9 @@ static int usb_phy_gen_xceiv_probe(struct platform_device *pdev)
274 return 0; 274 return 0;
275} 275}
276 276
277static int usb_phy_gen_xceiv_remove(struct platform_device *pdev) 277static int usb_phy_generic_remove(struct platform_device *pdev)
278{ 278{
279 struct usb_phy_gen_xceiv *nop = platform_get_drvdata(pdev); 279 struct usb_phy_generic *nop = platform_get_drvdata(pdev);
280 280
281 usb_remove_phy(&nop->phy); 281 usb_remove_phy(&nop->phy);
282 282
@@ -290,29 +290,29 @@ static const struct of_device_id nop_xceiv_dt_ids[] = {
290 290
291MODULE_DEVICE_TABLE(of, nop_xceiv_dt_ids); 291MODULE_DEVICE_TABLE(of, nop_xceiv_dt_ids);
292 292
293static struct platform_driver usb_phy_gen_xceiv_driver = { 293static struct platform_driver usb_phy_generic_driver = {
294 .probe = usb_phy_gen_xceiv_probe, 294 .probe = usb_phy_generic_probe,
295 .remove = usb_phy_gen_xceiv_remove, 295 .remove = usb_phy_generic_remove,
296 .driver = { 296 .driver = {
297 .name = "usb_phy_gen_xceiv", 297 .name = "usb_phy_generic",
298 .owner = THIS_MODULE, 298 .owner = THIS_MODULE,
299 .of_match_table = nop_xceiv_dt_ids, 299 .of_match_table = nop_xceiv_dt_ids,
300 }, 300 },
301}; 301};
302 302
303static int __init usb_phy_gen_xceiv_init(void) 303static int __init usb_phy_generic_init(void)
304{ 304{
305 return platform_driver_register(&usb_phy_gen_xceiv_driver); 305 return platform_driver_register(&usb_phy_generic_driver);
306} 306}
307subsys_initcall(usb_phy_gen_xceiv_init); 307subsys_initcall(usb_phy_generic_init);
308 308
309static void __exit usb_phy_gen_xceiv_exit(void) 309static void __exit usb_phy_generic_exit(void)
310{ 310{
311 platform_driver_unregister(&usb_phy_gen_xceiv_driver); 311 platform_driver_unregister(&usb_phy_generic_driver);
312} 312}
313module_exit(usb_phy_gen_xceiv_exit); 313module_exit(usb_phy_generic_exit);
314 314
315MODULE_ALIAS("platform:usb_phy_gen_xceiv"); 315MODULE_ALIAS("platform:usb_phy_generic");
316MODULE_AUTHOR("Texas Instruments Inc"); 316MODULE_AUTHOR("Texas Instruments Inc");
317MODULE_DESCRIPTION("NOP USB Transceiver driver"); 317MODULE_DESCRIPTION("NOP USB Transceiver driver");
318MODULE_LICENSE("GPL"); 318MODULE_LICENSE("GPL");