22 #include <linux/module.h>
23 #include <linux/kernel.h>
37 #define glue_to_musb(g) platform_get_drvdata(g->musb)
39 static int ux500_musb_init(
struct musb *
musb)
42 if (IS_ERR_OR_NULL(musb->
xceiv)) {
43 pr_err(
"HS USB OTG: no transceiver configured\n");
50 static int ux500_musb_exit(
struct musb *
musb)
58 .init = ux500_musb_init,
59 .exit = ux500_musb_exit,
73 dev_err(&pdev->
dev,
"failed to allocate glue context\n");
80 dev_err(&pdev->
dev,
"failed to allocate musb id\n");
87 dev_err(&pdev->
dev,
"failed to allocate musb device\n");
100 dev_err(&pdev->
dev,
"failed to enable clock\n");
105 musb->
dev.parent = &pdev->
dev;
106 musb->
dev.dma_mask = pdev->
dev.dma_mask;
107 musb->
dev.coherent_dma_mask = pdev->
dev.coherent_dma_mask;
115 platform_set_drvdata(pdev, glue);
120 dev_err(&pdev->
dev,
"failed to add resources\n");
126 dev_err(&pdev->
dev,
"failed to add platform_data\n");
132 dev_err(&pdev->
dev,
"failed to register musb device\n");
159 struct ux500_glue *glue = platform_get_drvdata(pdev);
172 static int ux500_suspend(
struct device *
dev)
177 usb_phy_set_suspend(musb->
xceiv, 1);
183 static int ux500_resume(
struct device *
dev)
191 dev_err(dev,
"failed to enable clock\n");
195 usb_phy_set_suspend(musb->
xceiv, 0);
200 static const struct dev_pm_ops ux500_pm_ops = {
202 .resume = ux500_resume,
205 #define DEV_PM_OPS (&ux500_pm_ops)
207 #define DEV_PM_OPS NULL
211 .probe = ux500_probe,
214 .name =
"musb-ux500",
223 static int __init ux500_init(
void)
229 static void __exit ux500_exit(
void)