| /* |
| * Samsung Exynos SoC series VPU driver |
| * |
| * Copyright (c) 2015 Samsung Electronics Co., Ltd |
| * |
| * This program is free software; you can redistribute it and/or modify |
| * it under the terms of the GNU General Public License version 2 as |
| * published by the Free Software Foundation. |
| */ |
| |
| #ifndef VISION_DEV_H_ |
| #define VISION_DEV_H_ |
| |
| #include <linux/fs.h> |
| #include <linux/device.h> |
| |
| #define VISION_NUM_DEVICES 256 |
| #define VISION_MAJOR 82 |
| #define VISION_NAME "vision4linux" |
| |
| enum VISION_DEVICE_TYPE { |
| VISION_DEVICE_TYPE_VERTEX |
| }; |
| |
| struct vision_file_ops { |
| struct module *owner; int (*open)(struct file *); |
| int (*release)(struct file *); |
| unsigned int (*poll)(struct file *, struct poll_table_struct *); |
| long (*ioctl)(struct file *, unsigned int, unsigned long); |
| long (*compat_ioctl)(struct file *file, unsigned int, unsigned long); |
| }; |
| |
| enum VISION_FLAGS { |
| VISION_FL_REGISTERED |
| }; |
| |
| struct vision_device { |
| int minor; |
| char name[32]; |
| unsigned long flags; |
| int index; |
| u32 type; |
| |
| /* device ops */ |
| const struct vision_file_ops *fops; |
| |
| /* sysfs */ |
| struct device dev; |
| struct cdev *cdev; |
| struct device *parent; |
| |
| /* vb2_queue associated with this device node. May be NULL. */ |
| //struct vb2_queue *queue; |
| |
| |
| int debug; /* Activates debug level*/ |
| |
| /* callbacks */ |
| void (*release)(struct vision_device *vdev); |
| |
| /* ioctl callbacks */ |
| const struct vertex_ioctl_ops *ioctl_ops; |
| //DECLARE_BITMAP(valid_ioctls, BASE_VIDIOC_PRIVATE); |
| |
| /* serialization lock */ |
| //DECLARE_BITMAP(disable_locking, BASE_VIDIOC_PRIVATE); |
| struct mutex *lock; |
| }; |
| |
| struct vision_device *vision_devdata(struct file *file); |
| int vision_register_device(struct vision_device *vdev, int minor, struct module *owner); |
| |
| #endif |