Lines Matching refs:mdev
65 struct macio_dev *mdev; member
452 struct macio_dev *mdev; in mb_broadcast_hotplug() local
462 mdev = to_macio_device(dev); in mb_broadcast_hotplug()
465 drv->mediabay_event(mdev, state); in mb_broadcast_hotplug()
509 device_for_each_child(&bay->mdev->ofdev.dev, in media_bay_step()
523 device_for_each_child(&bay->mdev->ofdev.dev, in media_bay_step()
529 device_for_each_child(&bay->mdev->ofdev.dev, in media_bay_step()
559 static int media_bay_attach(struct macio_dev *mdev, in media_bay_attach() argument
568 ofnode = mdev->ofdev.dev.of_node; in media_bay_attach()
570 if (macio_resource_count(mdev) < 1) in media_bay_attach()
572 if (macio_request_resources(mdev, "media-bay")) in media_bay_attach()
578 base = macio_resource_start(mdev, 0) & 0xffff0000u; in media_bay_attach()
581 macio_release_resources(mdev); in media_bay_attach()
587 bay->mdev = mdev; in media_bay_attach()
609 macio_set_drvdata(mdev, bay); in media_bay_attach()
619 static int media_bay_suspend(struct macio_dev *mdev, pm_message_t state) in media_bay_suspend() argument
621 struct media_bay_info *bay = macio_get_drvdata(mdev); in media_bay_suspend()
623 if (state.event != mdev->ofdev.dev.power.power_state.event in media_bay_suspend()
630 mdev->ofdev.dev.power.power_state = state; in media_bay_suspend()
635 static int media_bay_resume(struct macio_dev *mdev) in media_bay_resume() argument
637 struct media_bay_info *bay = macio_get_drvdata(mdev); in media_bay_resume()
639 if (mdev->ofdev.dev.power.power_state.event != PM_EVENT_ON) { in media_bay_resume()
640 mdev->ofdev.dev.power.power_state = PMSG_ON; in media_bay_resume()