diff options
Diffstat (limited to 'drivers/media/video/cx25840/cx25840-core.h')
-rw-r--r-- | drivers/media/video/cx25840/cx25840-core.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/drivers/media/video/cx25840/cx25840-core.h b/drivers/media/video/cx25840/cx25840-core.h index 814b5653699..55345444417 100644 --- a/drivers/media/video/cx25840/cx25840-core.h +++ b/drivers/media/video/cx25840/cx25840-core.h | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | #include <linux/videodev2.h> | 24 | #include <linux/videodev2.h> |
25 | #include <media/v4l2-device.h> | 25 | #include <media/v4l2-device.h> |
26 | #include <media/v4l2-chip-ident.h> | ||
26 | #include <linux/i2c.h> | 27 | #include <linux/i2c.h> |
27 | 28 | ||
28 | /* ENABLE_PVR150_WORKAROUND activates a workaround for a hardware bug that is | 29 | /* ENABLE_PVR150_WORKAROUND activates a workaround for a hardware bug that is |
@@ -48,9 +49,6 @@ struct cx25840_state { | |||
48 | int vbi_line_offset; | 49 | int vbi_line_offset; |
49 | u32 id; | 50 | u32 id; |
50 | u32 rev; | 51 | u32 rev; |
51 | int is_cx25836; | ||
52 | int is_cx23885; | ||
53 | int is_cx231xx; | ||
54 | int is_initialized; | 52 | int is_initialized; |
55 | wait_queue_head_t fw_wait; /* wake up when the fw load is finished */ | 53 | wait_queue_head_t fw_wait; /* wake up when the fw load is finished */ |
56 | struct work_struct fw_work; /* work entry for fw load */ | 54 | struct work_struct fw_work; /* work entry for fw load */ |
@@ -61,6 +59,24 @@ static inline struct cx25840_state *to_state(struct v4l2_subdev *sd) | |||
61 | return container_of(sd, struct cx25840_state, sd); | 59 | return container_of(sd, struct cx25840_state, sd); |
62 | } | 60 | } |
63 | 61 | ||
62 | static inline bool is_cx2583x(struct cx25840_state *state) | ||
63 | { | ||
64 | return state->id == V4L2_IDENT_CX25836 || | ||
65 | state->id == V4L2_IDENT_CX25837; | ||
66 | } | ||
67 | |||
68 | static inline bool is_cx231xx(struct cx25840_state *state) | ||
69 | { | ||
70 | return state->id == V4L2_IDENT_CX2310X_AV; | ||
71 | } | ||
72 | |||
73 | static inline bool is_cx2388x(struct cx25840_state *state) | ||
74 | { | ||
75 | return state->id == V4L2_IDENT_CX23885_AV || | ||
76 | state->id == V4L2_IDENT_CX23887_AV || | ||
77 | state->id == V4L2_IDENT_CX23888_AV; | ||
78 | } | ||
79 | |||
64 | /* ----------------------------------------------------------------------- */ | 80 | /* ----------------------------------------------------------------------- */ |
65 | /* cx25850-core.c */ | 81 | /* cx25850-core.c */ |
66 | int cx25840_write(struct i2c_client *client, u16 addr, u8 value); | 82 | int cx25840_write(struct i2c_client *client, u16 addr, u8 value); |