Date: | 2014-04-16 22:20:44 (9 years 11 months ago) |
---|---|
Author: | Felipe Balbi |
Commit: | 4525beeb9aadbb9e1cb3e9e135f4371553f26a70 |
Message: | usb: phy: rename usb_nop_xceiv to usb_phy_generic no functional changes, just renaming the function in order to make it slightly clearer what it should be used for, also matching the driver name. Signed-off-by: Felipe Balbi <balbi@ti.com> |
Files: |
arch/arm/mach-omap2/usb-host.c (3 diffs) drivers/usb/dwc3/dwc3-exynos.c (2 diffs) drivers/usb/dwc3/dwc3-pci.c (2 diffs) drivers/usb/musb/am35x.c (2 diffs) drivers/usb/musb/blackfin.c (2 diffs) drivers/usb/musb/da8xx.c (2 diffs) drivers/usb/musb/davinci.c (3 diffs) drivers/usb/musb/tusb6010.c (3 diffs) drivers/usb/phy/phy-am335x.c (1 diff) drivers/usb/phy/phy-generic.c (7 diffs) drivers/usb/phy/phy-generic.h (2 diffs) drivers/usb/phy/phy-keystone.c (1 diff) include/linux/usb/usb_phy_gen_xceiv.h (2 diffs) |
Change Details
arch/arm/mach-omap2/usb-host.c | ||
---|---|---|
349 | 349 | /* .init_data filled later */ |
350 | 350 | }; |
351 | 351 | |
352 | static const char *nop_name = "usb_phy_gen_xceiv"; /* NOP PHY driver */ | |
352 | static const char *nop_name = "usb_phy_generic"; /* NOP PHY driver */ | |
353 | 353 | static const char *reg_name = "reg-fixed-voltage"; /* Regulator driver */ |
354 | 354 | |
355 | 355 | /** |
... | ... | |
435 | 435 | struct platform_device *pdev; |
436 | 436 | char *phy_id; |
437 | 437 | struct platform_device_info pdevinfo; |
438 | struct usb_phy_gen_xceiv_platform_data nop_pdata; | |
438 | struct usb_phy_generic_platform_data nop_pdata; | |
439 | 439 | |
440 | 440 | for (i = 0; i < num_phys; i++) { |
441 | 441 | |
... | ... | |
469 | 469 | pdevinfo.id = phy->port; |
470 | 470 | pdevinfo.data = &nop_pdata; |
471 | 471 | pdevinfo.size_data = |
472 | sizeof(struct usb_phy_gen_xceiv_platform_data); | |
473 | scnprintf(phy_id, MAX_STR, "usb_phy_gen_xceiv.%d", | |
472 | sizeof(struct usb_phy_generic_platform_data); | |
473 | scnprintf(phy_id, MAX_STR, "usb_phy_generic.%d", | |
474 | 474 | phy->port); |
475 | 475 | pdev = platform_device_register_full(&pdevinfo); |
476 | 476 | if (IS_ERR(pdev)) { |
drivers/usb/dwc3/dwc3-exynos.c | ||
---|---|---|
38 | 38 | |
39 | 39 | static int dwc3_exynos_register_phys(struct dwc3_exynos *exynos) |
40 | 40 | { |
41 | struct usb_phy_gen_xceiv_platform_data pdata; | |
41 | struct usb_phy_generic_platform_data pdata; | |
42 | 42 | struct platform_device *pdev; |
43 | 43 | int ret; |
44 | 44 | |
45 | 45 | memset(&pdata, 0x00, sizeof(pdata)); |
46 | 46 | |
47 | pdev = platform_device_alloc("usb_phy_gen_xceiv", PLATFORM_DEVID_AUTO); | |
47 | pdev = platform_device_alloc("usb_phy_generic", PLATFORM_DEVID_AUTO); | |
48 | 48 | if (!pdev) |
49 | 49 | return -ENOMEM; |
50 | 50 | |
... | ... | |
56 | 56 | if (ret) |
57 | 57 | goto err1; |
58 | 58 | |
59 | pdev = platform_device_alloc("usb_phy_gen_xceiv", PLATFORM_DEVID_AUTO); | |
59 | pdev = platform_device_alloc("usb_phy_generic", PLATFORM_DEVID_AUTO); | |
60 | 60 | if (!pdev) { |
61 | 61 | ret = -ENOMEM; |
62 | 62 | goto err1; |
drivers/usb/dwc3/dwc3-pci.c | ||
---|---|---|
40 | 40 | |
41 | 41 | static int dwc3_pci_register_phys(struct dwc3_pci *glue) |
42 | 42 | { |
43 | struct usb_phy_gen_xceiv_platform_data pdata; | |
43 | struct usb_phy_generic_platform_data pdata; | |
44 | 44 | struct platform_device *pdev; |
45 | 45 | int ret; |
46 | 46 | |
47 | 47 | memset(&pdata, 0x00, sizeof(pdata)); |
48 | 48 | |
49 | pdev = platform_device_alloc("usb_phy_gen_xceiv", 0); | |
49 | pdev = platform_device_alloc("usb_phy_generic", 0); | |
50 | 50 | if (!pdev) |
51 | 51 | return -ENOMEM; |
52 | 52 | |
... | ... | |
58 | 58 | if (ret) |
59 | 59 | goto err1; |
60 | 60 | |
61 | pdev = platform_device_alloc("usb_phy_gen_xceiv", 1); | |
61 | pdev = platform_device_alloc("usb_phy_generic", 1); | |
62 | 62 | if (!pdev) { |
63 | 63 | ret = -ENOMEM; |
64 | 64 | goto err1; |
drivers/usb/musb/am35x.c | ||
---|---|---|
360 | 360 | if (!rev) |
361 | 361 | return -ENODEV; |
362 | 362 | |
363 | usb_nop_xceiv_register(); | |
363 | usb_phy_generic_register(); | |
364 | 364 | musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2); |
365 | 365 | if (IS_ERR_OR_NULL(musb->xceiv)) |
366 | 366 | return -EPROBE_DEFER; |
... | ... | |
402 | 402 | data->set_phy_power(0); |
403 | 403 | |
404 | 404 | usb_put_phy(musb->xceiv); |
405 | usb_nop_xceiv_unregister(); | |
405 | usb_phy_generic_unregister(); | |
406 | 406 | |
407 | 407 | return 0; |
408 | 408 | } |
drivers/usb/musb/blackfin.c | ||
---|---|---|
401 | 401 | } |
402 | 402 | gpio_direction_output(musb->config->gpio_vrsel, 0); |
403 | 403 | |
404 | usb_nop_xceiv_register(); | |
404 | usb_phy_generic_register(); | |
405 | 405 | musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2); |
406 | 406 | if (IS_ERR_OR_NULL(musb->xceiv)) { |
407 | 407 | gpio_free(musb->config->gpio_vrsel); |
... | ... | |
426 | 426 | gpio_free(musb->config->gpio_vrsel); |
427 | 427 | |
428 | 428 | usb_put_phy(musb->xceiv); |
429 | usb_nop_xceiv_unregister(); | |
429 | usb_phy_generic_unregister(); | |
430 | 430 | return 0; |
431 | 431 | } |
432 | 432 |
drivers/usb/musb/da8xx.c | ||
---|---|---|
418 | 418 | if (!rev) |
419 | 419 | goto fail; |
420 | 420 | |
421 | usb_nop_xceiv_register(); | |
421 | usb_phy_generic_register(); | |
422 | 422 | musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2); |
423 | 423 | if (IS_ERR_OR_NULL(musb->xceiv)) { |
424 | 424 | ret = -EPROBE_DEFER; |
... | ... | |
453 | 453 | phy_off(); |
454 | 454 | |
455 | 455 | usb_put_phy(musb->xceiv); |
456 | usb_nop_xceiv_unregister(); | |
456 | usb_phy_generic_unregister(); | |
457 | 457 | |
458 | 458 | return 0; |
459 | 459 | } |
drivers/usb/musb/davinci.c | ||
---|---|---|
381 | 381 | u32 revision; |
382 | 382 | int ret = -ENODEV; |
383 | 383 | |
384 | usb_nop_xceiv_register(); | |
384 | usb_phy_generic_register(); | |
385 | 385 | musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2); |
386 | 386 | if (IS_ERR_OR_NULL(musb->xceiv)) { |
387 | 387 | ret = -EPROBE_DEFER; |
... | ... | |
439 | 439 | fail: |
440 | 440 | usb_put_phy(musb->xceiv); |
441 | 441 | unregister: |
442 | usb_nop_xceiv_unregister(); | |
442 | usb_phy_generic_unregister(); | |
443 | 443 | return ret; |
444 | 444 | } |
445 | 445 | |
... | ... | |
487 | 487 | phy_off(); |
488 | 488 | |
489 | 489 | usb_put_phy(musb->xceiv); |
490 | usb_nop_xceiv_unregister(); | |
490 | usb_phy_generic_unregister(); | |
491 | 491 | |
492 | 492 | return 0; |
493 | 493 | } |
drivers/usb/musb/tusb6010.c | ||
---|---|---|
1065 | 1065 | void __iomem *sync = NULL; |
1066 | 1066 | int ret; |
1067 | 1067 | |
1068 | usb_nop_xceiv_register(); | |
1068 | usb_phy_generic_register(); | |
1069 | 1069 | musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2); |
1070 | 1070 | if (IS_ERR_OR_NULL(musb->xceiv)) |
1071 | 1071 | return -EPROBE_DEFER; |
... | ... | |
1117 | 1117 | iounmap(sync); |
1118 | 1118 | |
1119 | 1119 | usb_put_phy(musb->xceiv); |
1120 | usb_nop_xceiv_unregister(); | |
1120 | usb_phy_generic_unregister(); | |
1121 | 1121 | } |
1122 | 1122 | return ret; |
1123 | 1123 | } |
... | ... | |
1133 | 1133 | iounmap(musb->sync_va); |
1134 | 1134 | |
1135 | 1135 | usb_put_phy(musb->xceiv); |
1136 | usb_nop_xceiv_unregister(); | |
1136 | usb_phy_generic_unregister(); | |
1137 | 1137 | return 0; |
1138 | 1138 | } |
1139 | 1139 |
drivers/usb/phy/phy-am335x.c | ||
---|---|---|
13 | 13 | #include "phy-generic.h" |
14 | 14 | |
15 | 15 | struct am335x_phy { |
16 | struct usb_phy_gen_xceiv usb_phy_gen; | |
16 | struct usb_phy_generic usb_phy_gen; | |
17 | 17 | struct phy_control *phy_ctrl; |
18 | 18 | int id; |
19 | 19 | }; |
drivers/usb/phy/phy-generic.c | ||
---|---|---|
43 | 43 | |
44 | 44 | static struct platform_device *pd; |
45 | 45 | |
46 | void usb_nop_xceiv_register(void) | |
46 | void usb_phy_generic_register(void) | |
47 | 47 | { |
48 | 48 | if (pd) |
49 | 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 | 51 | if (IS_ERR(pd)) { |
52 | 52 | pr_err("Unable to register generic usb transceiver\n"); |
53 | 53 | pd = NULL; |
54 | 54 | return; |
55 | 55 | } |
56 | 56 | } |
57 | EXPORT_SYMBOL_GPL(usb_nop_xceiv_register); | |
57 | EXPORT_SYMBOL_GPL(usb_phy_generic_register); | |
58 | 58 | |
59 | void usb_nop_xceiv_unregister(void) | |
59 | void usb_phy_generic_unregister(void) | |
60 | 60 | { |
61 | 61 | platform_device_unregister(pd); |
62 | 62 | pd = NULL; |
63 | 63 | } |
64 | EXPORT_SYMBOL_GPL(usb_nop_xceiv_unregister); | |
64 | EXPORT_SYMBOL_GPL(usb_phy_generic_unregister); | |
65 | 65 | |
66 | 66 | static int nop_set_suspend(struct usb_phy *x, int suspend) |
67 | 67 | { |
68 | 68 | return 0; |
69 | 69 | } |
70 | 70 | |
71 | static void nop_reset_set(struct usb_phy_gen_xceiv *nop, int asserted) | |
71 | static void nop_reset_set(struct usb_phy_generic *nop, int asserted) | |
72 | 72 | { |
73 | 73 | int value; |
74 | 74 | |
... | ... | |
87 | 87 | |
88 | 88 | int 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 | 92 | if (!IS_ERR(nop->vcc)) { |
93 | 93 | if (regulator_enable(nop->vcc)) |
... | ... | |
106 | 106 | |
107 | 107 | void 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 | 111 | /* Assert RESET */ |
112 | 112 | nop_reset_set(nop, 1); |
... | ... | |
150 | 150 | return 0; |
151 | 151 | } |
152 | 152 | |
153 | int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_gen_xceiv *nop, | |
154 | struct usb_phy_gen_xceiv_platform_data *pdata) | |
153 | int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop, | |
154 | struct usb_phy_generic_platform_data *pdata) | |
155 | 155 | { |
156 | 156 | enum usb_phy_type type = USB_PHY_TYPE_USB2; |
157 | 157 | int err; |
... | ... | |
245 | 245 | } |
246 | 246 | EXPORT_SYMBOL_GPL(usb_phy_gen_create_phy); |
247 | 247 | |
248 | static int usb_phy_gen_xceiv_probe(struct platform_device *pdev) | |
248 | static int usb_phy_generic_probe(struct platform_device *pdev) | |
249 | 249 | { |
250 | 250 | struct device *dev = &pdev->dev; |
251 | struct usb_phy_gen_xceiv *nop; | |
251 | struct usb_phy_generic *nop; | |
252 | 252 | int err; |
253 | 253 | |
254 | 254 | nop = devm_kzalloc(dev, sizeof(*nop), GFP_KERNEL); |
... | ... | |
274 | 274 | return 0; |
275 | 275 | } |
276 | 276 | |
277 | static int usb_phy_gen_xceiv_remove(struct platform_device *pdev) | |
277 | static 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 | 281 | usb_remove_phy(&nop->phy); |
282 | 282 | |
... | ... | |
290 | 290 | |
291 | 291 | MODULE_DEVICE_TABLE(of, nop_xceiv_dt_ids); |
292 | 292 | |
293 | static struct platform_driver usb_phy_gen_xceiv_driver = { | |
294 | .probe = usb_phy_gen_xceiv_probe, | |
295 | .remove = usb_phy_gen_xceiv_remove, | |
293 | static struct platform_driver usb_phy_generic_driver = { | |
294 | .probe = usb_phy_generic_probe, | |
295 | .remove = usb_phy_generic_remove, | |
296 | 296 | .driver = { |
297 | .name = "usb_phy_gen_xceiv", | |
297 | .name = "usb_phy_generic", | |
298 | 298 | .owner = THIS_MODULE, |
299 | 299 | .of_match_table = nop_xceiv_dt_ids, |
300 | 300 | }, |
301 | 301 | }; |
302 | 302 | |
303 | static int __init usb_phy_gen_xceiv_init(void) | |
303 | static 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 | } |
307 | subsys_initcall(usb_phy_gen_xceiv_init); | |
307 | subsys_initcall(usb_phy_generic_init); | |
308 | 308 | |
309 | static void __exit usb_phy_gen_xceiv_exit(void) | |
309 | static 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 | } |
313 | module_exit(usb_phy_gen_xceiv_exit); | |
313 | module_exit(usb_phy_generic_exit); | |
314 | 314 | |
315 | MODULE_ALIAS("platform:usb_phy_gen_xceiv"); | |
315 | MODULE_ALIAS("platform:usb_phy_generic"); | |
316 | 316 | MODULE_AUTHOR("Texas Instruments Inc"); |
317 | 317 | MODULE_DESCRIPTION("NOP USB Transceiver driver"); |
318 | 318 | MODULE_LICENSE("GPL"); |
drivers/usb/phy/phy-generic.h | ||
---|---|---|
3 | 3 | |
4 | 4 | #include <linux/usb/usb_phy_gen_xceiv.h> |
5 | 5 | |
6 | struct usb_phy_gen_xceiv { | |
6 | struct usb_phy_generic { | |
7 | 7 | struct usb_phy phy; |
8 | 8 | struct device *dev; |
9 | 9 | struct clk *clk; |
... | ... | |
15 | 15 | int usb_gen_phy_init(struct usb_phy *phy); |
16 | 16 | void usb_gen_phy_shutdown(struct usb_phy *phy); |
17 | 17 | |
18 | int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_gen_xceiv *nop, | |
19 | struct usb_phy_gen_xceiv_platform_data *pdata); | |
18 | int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop, | |
19 | struct usb_phy_generic_platform_data *pdata); | |
20 | 20 | |
21 | 21 | #endif |
drivers/usb/phy/phy-keystone.c | ||
---|---|---|
35 | 35 | #define PHY_REF_SSP_EN BIT(29) |
36 | 36 | |
37 | 37 | struct keystone_usbphy { |
38 | struct usb_phy_gen_xceiv usb_phy_gen; | |
38 | struct usb_phy_generic usb_phy_gen; | |
39 | 39 | void __iomem *phy_ctrl; |
40 | 40 | }; |
41 | 41 |
include/linux/usb/usb_phy_gen_xceiv.h | ||
---|---|---|
3 | 3 | |
4 | 4 | #include <linux/usb/otg.h> |
5 | 5 | |
6 | struct usb_phy_gen_xceiv_platform_data { | |
6 | struct usb_phy_generic_platform_data { | |
7 | 7 | enum usb_phy_type type; |
8 | 8 | unsigned long clk_rate; |
9 | 9 | |
... | ... | |
15 | 15 | |
16 | 16 | #if defined(CONFIG_NOP_USB_XCEIV) || (defined(CONFIG_NOP_USB_XCEIV_MODULE) && defined(MODULE)) |
17 | 17 | /* sometimes transceivers are accessed only through e.g. ULPI */ |
18 | extern void usb_nop_xceiv_register(void); | |
19 | extern void usb_nop_xceiv_unregister(void); | |
18 | extern void usb_phy_generic_register(void); | |
19 | extern void usb_phy_generic_unregister(void); | |
20 | 20 | #else |
21 | static inline void usb_nop_xceiv_register(void) | |
21 | static inline void usb_phy_generic_register(void) | |
22 | 22 | { |
23 | 23 | } |
24 | 24 | |
25 | static inline void usb_nop_xceiv_unregister(void) | |
25 | static inline void usb_phy_generic_unregister(void) | |
26 | 26 | { |
27 | 27 | } |
28 | 28 | #endif |
Branches:
ben-wpan
ben-wpan-stefan
5396a9238205f20f811ea57898980d3ca82df0b6
jz-2.6.34
jz-2.6.34-rc5
jz-2.6.34-rc6
jz-2.6.34-rc7
jz-2.6.35
jz-2.6.36
jz-2.6.37
jz-2.6.38
jz-2.6.39
jz-3.0
jz-3.1
jz-3.11
jz-3.12
jz-3.13
jz-3.15
jz-3.16
jz-3.18-dt
jz-3.2
jz-3.3
jz-3.4
jz-3.5
jz-3.6
jz-3.6-rc2-pwm
jz-3.9
jz-3.9-clk
jz-3.9-rc8
jz47xx
jz47xx-2.6.38
master
Tags:
od-2011-09-04
od-2011-09-18
v2.6.34-rc5
v2.6.34-rc6
v2.6.34-rc7
v3.9