thermal: rockchip: add rk3328 support
[firefly-linux-kernel-4.4.55.git] / drivers / cmmb / cmmb_class.h
1 #ifndef _CMMB_CLASS_H_\r
2 #define _CMMB_CLASS_H_\r
3 \r
4 \r
5 #include <linux/types.h>\r
6 #include <linux/poll.h>\r
7 #include <linux/fs.h>\r
8 #include <linux/list.h>\r
9 \r
10 #define CMMB_MAJOR 200\r
11 \r
12 \r
13 #define CMMB_DEVICE_TUNER   0\r
14 #define CMMB_DEVICE_DEMO    1\r
15 #define CMMB_DEVICE_DEMUX   2\r
16 #define CMMB_DEVICE_CA      3\r
17 #define CMMB_DEVICE_MEMO    4\r
18 \r
19 extern struct class * cmmb_class;\r
20 \r
21 struct cmmb_adapter {\r
22         int num;\r
23         struct list_head list_head;\r
24         struct list_head device_list;\r
25         const char *name;\r
26         void* priv;\r
27         struct device *device;\r
28 };\r
29 \r
30 \r
31 extern struct cmmb_adapter CMMB_adapter;\r
32 struct cmmb_device {\r
33         struct list_head list_head;\r
34         struct file_operations *fops;\r
35         struct cmmb_adapter *adapter;\r
36         int type;\r
37         u32 id;\r
38 \r
39         wait_queue_head_t         wait_queue;\r
40 \r
41         int (*kernel_ioctl)(struct inode *inode, struct file *file,\r
42                             unsigned int cmd, void *arg);\r
43 \r
44         void *priv;\r
45 };\r
46 \r
47 \r
48 int cmmb_register_device(struct cmmb_adapter *adap, struct cmmb_device **pcmmbdev,\r
49                          struct file_operations *fops, void *priv, int type,char* name);\r
50 void cmmb_unregister_device(struct cmmb_device *cmmbdev);\r
51 \r
52 #define cmmb_attach(FUNCTION, ARGS...) ({ \\r
53         FUNCTION(ARGS); \\r
54 \r
55 \r
56 #endif/* #ifndef _CMMB_CLASS_H_ */\r