Lines Matching refs:vdev
25 static struct resource *get_platform_resource(struct vfio_platform_device *vdev, in get_platform_resource() argument
28 struct platform_device *dev = (struct platform_device *) vdev->opaque; in get_platform_resource()
33 static int get_platform_irq(struct vfio_platform_device *vdev, int i) in get_platform_irq() argument
35 struct platform_device *pdev = (struct platform_device *) vdev->opaque; in get_platform_irq()
42 struct vfio_platform_device *vdev = in vfio_platform_init_dev() local
43 container_of(core_vdev, struct vfio_platform_device, vdev); in vfio_platform_init_dev()
46 vdev->opaque = (void *) pdev; in vfio_platform_init_dev()
47 vdev->name = pdev->name; in vfio_platform_init_dev()
48 vdev->flags = VFIO_DEVICE_FLAGS_PLATFORM; in vfio_platform_init_dev()
49 vdev->get_resource = get_platform_resource; in vfio_platform_init_dev()
50 vdev->get_irq = get_platform_irq; in vfio_platform_init_dev()
51 vdev->reset_required = reset_required; in vfio_platform_init_dev()
53 return vfio_platform_init_common(vdev); in vfio_platform_init_dev()
59 struct vfio_platform_device *vdev; in vfio_platform_probe() local
62 vdev = vfio_alloc_device(vfio_platform_device, vdev, &pdev->dev, in vfio_platform_probe()
64 if (IS_ERR(vdev)) in vfio_platform_probe()
65 return PTR_ERR(vdev); in vfio_platform_probe()
67 ret = vfio_register_group_dev(&vdev->vdev); in vfio_platform_probe()
72 dev_set_drvdata(&pdev->dev, vdev); in vfio_platform_probe()
76 vfio_put_device(&vdev->vdev); in vfio_platform_probe()
82 struct vfio_platform_device *vdev = in vfio_platform_release_dev() local
83 container_of(core_vdev, struct vfio_platform_device, vdev); in vfio_platform_release_dev()
85 vfio_platform_release_common(vdev); in vfio_platform_release_dev()
90 struct vfio_platform_device *vdev = dev_get_drvdata(&pdev->dev); in vfio_platform_remove() local
92 vfio_unregister_group_dev(&vdev->vdev); in vfio_platform_remove()
93 pm_runtime_disable(vdev->device); in vfio_platform_remove()
94 vfio_put_device(&vdev->vdev); in vfio_platform_remove()