aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pvrusb2/pvrusb2-i2c-core.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-i2c-core.h')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-i2c-core.h57
1 files changed, 1 insertions, 56 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-i2c-core.h b/drivers/media/video/pvrusb2/pvrusb2-i2c-core.h
index 6ef7a1c0e935..6a75769200bd 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-i2c-core.h
+++ b/drivers/media/video/pvrusb2/pvrusb2-i2c-core.h
@@ -20,68 +20,13 @@
20#ifndef __PVRUSB2_I2C_CORE_H 20#ifndef __PVRUSB2_I2C_CORE_H
21#define __PVRUSB2_I2C_CORE_H 21#define __PVRUSB2_I2C_CORE_H
22 22
23#include <linux/list.h>
24#include <linux/i2c.h>
25
26struct pvr2_hdw; 23struct pvr2_hdw;
27struct pvr2_i2c_client;
28struct pvr2_i2c_handler;
29struct pvr2_i2c_handler_functions;
30struct pvr2_i2c_op;
31struct pvr2_i2c_op_functions;
32
33struct pvr2_i2c_client {
34 struct i2c_client *client;
35 struct pvr2_i2c_handler *handler;
36 struct list_head list;
37 struct pvr2_hdw *hdw;
38 int detected_flag;
39 int recv_enable;
40 unsigned long pend_mask;
41 unsigned long ctl_mask;
42 void (*status_poll)(struct pvr2_i2c_client *);
43};
44
45struct pvr2_i2c_handler {
46 void *func_data;
47 const struct pvr2_i2c_handler_functions *func_table;
48};
49
50struct pvr2_i2c_handler_functions {
51 void (*detach)(void *);
52 int (*check)(void *);
53 void (*update)(void *);
54 unsigned int (*describe)(void *,char *,unsigned int);
55};
56
57struct pvr2_i2c_op {
58 int (*check)(struct pvr2_hdw *);
59 void (*update)(struct pvr2_hdw *);
60 const char *name;
61};
62 24
63void pvr2_i2c_core_init(struct pvr2_hdw *); 25void pvr2_i2c_core_init(struct pvr2_hdw *);
64void pvr2_i2c_core_done(struct pvr2_hdw *); 26void pvr2_i2c_core_done(struct pvr2_hdw *);
65 27
66int pvr2_i2c_client_cmd(struct pvr2_i2c_client *,unsigned int cmd,void *arg);
67int pvr2_i2c_core_cmd(struct pvr2_hdw *,unsigned int cmd,void *arg);
68
69int pvr2_i2c_core_check_stale(struct pvr2_hdw *);
70void pvr2_i2c_core_sync(struct pvr2_hdw *);
71void pvr2_i2c_core_status_poll(struct pvr2_hdw *);
72unsigned int pvr2_i2c_report(struct pvr2_hdw *,char *buf,unsigned int maxlen);
73#define PVR2_I2C_DETAIL_DEBUG 0x0001
74#define PVR2_I2C_DETAIL_HANDLER 0x0002
75#define PVR2_I2C_DETAIL_CTLMASK 0x0004
76#define PVR2_I2C_DETAIL_ALL (\
77 PVR2_I2C_DETAIL_DEBUG |\
78 PVR2_I2C_DETAIL_HANDLER |\
79 PVR2_I2C_DETAIL_CTLMASK)
80
81void pvr2_i2c_probe(struct pvr2_hdw *,struct pvr2_i2c_client *);
82const struct pvr2_i2c_op *pvr2_i2c_get_op(unsigned int idx);
83 28
84#endif /* __PVRUSB2_I2C_CORE_H */ 29#endif /* __PVRUSB2_I2C_ADAPTER_H */
85 30
86 31
87/* 32/*