Lines Matching defs:mdev
28 #include <linux/mdev.h>
89 /* State of each mdev device */
94 struct mdev_device *mdev;
153 struct device *dev = mdev_dev(mdev_state->mdev);
175 static ssize_t mdev_access(struct mdev_device *mdev, char *buf, size_t count,
178 struct mdev_state *mdev_state = mdev_get_drvdata(mdev);
179 struct device *dev = mdev_dev(mdev);
215 static int mdpy_reset(struct mdev_device *mdev)
217 struct mdev_state *mdev_state = mdev_get_drvdata(mdev);
229 static int mdpy_create(struct kobject *kobj, struct mdev_device *mdev)
232 struct device *dev = mdev_dev(mdev);
263 mdev_state->mdev = mdev;
264 mdev_set_drvdata(mdev, mdev_state);
269 mdpy_reset(mdev);
275 static int mdpy_remove(struct mdev_device *mdev)
277 struct mdev_state *mdev_state = mdev_get_drvdata(mdev);
278 struct device *dev = mdev_dev(mdev);
282 mdev_set_drvdata(mdev, NULL);
291 static ssize_t mdpy_read(struct mdev_device *mdev, char __user *buf,
303 ret = mdev_access(mdev, (char *)&val, sizeof(val),
315 ret = mdev_access(mdev, (char *)&val, sizeof(val),
327 ret = mdev_access(mdev, (char *)&val, sizeof(val),
350 static ssize_t mdpy_write(struct mdev_device *mdev, const char __user *buf,
365 ret = mdev_access(mdev, (char *)&val, sizeof(val),
377 ret = mdev_access(mdev, (char *)&val, sizeof(val),
389 ret = mdev_access(mdev, (char *)&val, sizeof(val),
407 static int mdpy_mmap(struct mdev_device *mdev, struct vm_area_struct *vma)
409 struct mdev_state *mdev_state = mdev_get_drvdata(mdev);
425 static int mdpy_get_region_info(struct mdev_device *mdev,
431 mdev_state = mdev_get_drvdata(mdev);
463 static int mdpy_get_irq_info(struct mdev_device *mdev,
470 static int mdpy_get_device_info(struct mdev_device *mdev,
479 static int mdpy_query_gfx_plane(struct mdev_device *mdev,
482 struct mdev_state *mdev_state = mdev_get_drvdata(mdev);
512 static long mdpy_ioctl(struct mdev_device *mdev, unsigned int cmd,
519 mdev_state = mdev_get_drvdata(mdev);
534 ret = mdpy_get_device_info(mdev, &info);
559 ret = mdpy_get_region_info(mdev, &info, &cap_type_id,
583 ret = mdpy_get_irq_info(mdev, &info);
606 ret = mdpy_query_gfx_plane(mdev, &plane);
620 return mdpy_reset(mdev);
625 static int mdpy_open(struct mdev_device *mdev)
633 static void mdpy_close(struct mdev_device *mdev)
642 struct mdev_device *mdev = mdev_from_dev(dev);
643 struct mdev_state *mdev_state = mdev_get_drvdata(mdev);