Lines Matching full:glue
66 struct omap2430_glue *glue = _glue; in omap2430_musb_mailbox() local
68 if (!glue) { in omap2430_musb_mailbox()
72 glue->status = status; in omap2430_musb_mailbox()
74 if (!glue_to_musb(glue)) { in omap2430_musb_mailbox()
79 schedule_work(&glue->omap_musb_mailbox_work); in omap2430_musb_mailbox()
91 static void omap_musb_set_mailbox(struct omap2430_glue *glue) in omap_musb_set_mailbox() argument
93 struct musb *musb = glue_to_musb(glue); in omap_musb_set_mailbox()
102 switch (glue->status) { in omap_musb_set_mailbox()
125 omap_control_usb_set_mode(glue->control_otghs, in omap_musb_set_mailbox()
138 omap_control_usb_set_mode(glue->control_otghs, USB_MODE_DEVICE); in omap_musb_set_mailbox()
148 omap_control_usb_set_mode(glue->control_otghs, in omap_musb_set_mailbox()
163 struct omap2430_glue *glue = container_of(mailbox_work, in omap_musb_mailbox_work() local
166 omap_musb_set_mailbox(glue); in omap_musb_mailbox_work()
255 struct omap2430_glue *glue = dev_get_drvdata(dev->parent); in omap2430_musb_enable() local
257 if (glue->status == MUSB_UNKNOWN) in omap2430_musb_enable()
258 glue->status = MUSB_VBUS_OFF; in omap2430_musb_enable()
259 omap_musb_set_mailbox(glue); in omap2430_musb_enable()
265 struct omap2430_glue *glue = dev_get_drvdata(dev->parent); in omap2430_musb_disable() local
267 if (glue->status != MUSB_UNKNOWN) in omap2430_musb_disable()
268 omap_control_usb_set_mode(glue->control_otghs, in omap2430_musb_disable()
275 struct omap2430_glue *glue = dev_get_drvdata(dev->parent); in omap2430_musb_exit() local
281 cancel_work_sync(&glue->omap_musb_mailbox_work); in omap2430_musb_exit()
308 struct omap2430_glue *glue; in omap2430_probe() local
319 glue = devm_kzalloc(&pdev->dev, sizeof(*glue), GFP_KERNEL); in omap2430_probe()
320 if (!glue) in omap2430_probe()
345 glue->dev = &pdev->dev; in omap2430_probe()
346 glue->musb = musb; in omap2430_probe()
347 glue->status = MUSB_UNKNOWN; in omap2430_probe()
348 glue->control_otghs = ERR_PTR(-ENODEV); in omap2430_probe()
385 glue->control_otghs = &control_pdev->dev; in omap2430_probe()
390 platform_set_drvdata(pdev, glue); in omap2430_probe()
396 _glue = glue; in omap2430_probe()
398 INIT_WORK(&glue->omap_musb_mailbox_work, omap_musb_mailbox_work); in omap2430_probe()
454 pm_runtime_enable(glue->dev); in omap2430_probe()
465 pm_runtime_disable(glue->dev); in omap2430_probe()
476 struct omap2430_glue *glue = platform_get_drvdata(pdev); in omap2430_remove() local
478 platform_device_unregister(glue->musb); in omap2430_remove()
479 pm_runtime_disable(glue->dev); in omap2430_remove()
486 struct omap2430_glue *glue = dev_get_drvdata(dev); in omap2430_runtime_suspend() local
487 struct musb *musb = glue_to_musb(glue); in omap2430_runtime_suspend()
497 if (!glue->phy_suspended) { in omap2430_runtime_suspend()
502 glue->is_runtime_suspended = 1; in omap2430_runtime_suspend()
509 struct omap2430_glue *glue = dev_get_drvdata(dev); in omap2430_runtime_resume() local
510 struct musb *musb = glue_to_musb(glue); in omap2430_runtime_resume()
515 if (!glue->phy_suspended) { in omap2430_runtime_resume()
527 glue->is_runtime_suspended = 0; in omap2430_runtime_resume()
532 /* I2C and SPI PHYs need to be suspended before the glue layer */
535 struct omap2430_glue *glue = dev_get_drvdata(dev); in omap2430_suspend() local
536 struct musb *musb = glue_to_musb(glue); in omap2430_suspend()
540 glue->phy_suspended = 1; in omap2430_suspend()
545 /* Glue layer needs to be suspended after musb_suspend() */
548 struct omap2430_glue *glue = dev_get_drvdata(dev); in omap2430_suspend_late() local
550 if (glue->is_runtime_suspended) in omap2430_suspend_late()
553 glue->needs_resume = 1; in omap2430_suspend_late()
560 struct omap2430_glue *glue = dev_get_drvdata(dev); in omap2430_resume_early() local
562 if (!glue->needs_resume) in omap2430_resume_early()
565 glue->needs_resume = 0; in omap2430_resume_early()
572 struct omap2430_glue *glue = dev_get_drvdata(dev); in omap2430_resume() local
573 struct musb *musb = glue_to_musb(glue); in omap2430_resume()
577 glue->phy_suspended = 0; in omap2430_resume()
621 MODULE_DESCRIPTION("OMAP2PLUS MUSB Glue Layer");