aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-03-30 10:09:14 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-03-30 10:09:14 -0700
commitb94d10e7f6fce9af7d5054845511a00575c4b4f5 (patch)
tree8be617e5d9cfc8a1fe232ac2b6454caec7ca466a /drivers/media/video/cx88/cx88.h
parentMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse (diff)
parentV4L/DVB (11316): saa7191: tuner ops wasn't set. (diff)
downloadlinux-dev-b94d10e7f6fce9af7d5054845511a00575c4b4f5.tar.xz
linux-dev-b94d10e7f6fce9af7d5054845511a00575c4b4f5.zip
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (707 commits) V4L/DVB (11316): saa7191: tuner ops wasn't set. V4L/DVB (11315): cx25840: fix 'unused variable' warning. V4L/DVB (11314): au8522: remove unused I2C_DRIVERID V4L/DVB (11313): v4l2-subdev: add enum_framesizes and enum_frameintervals. V4L/DVB (11312): tuner: remove V4L1 code from this driver. V4L/DVB (11311): v4l: replace 'ioctl' references in v4l i2c drivers V4L/DVB (11310): cx18: remove intermediate 'ioctl' step V4L/DVB (11309): cx25840: cleanup: remove intermediate 'ioctl' step V4L/DVB (11308): msp3400: use the V4L2 header since no V4L1 code is there V4L/DVB (11305): cx88: prevent probing rtc and ir devices V4L/DVB (11304): v4l2: remove v4l2_subdev_command calls where they are no longer needed. V4L/DVB (11303): tda7432: remove legacy code for old-style i2c API V4L/DVB (11302): tda9875: remove legacy code for old-style i2c API V4L/DVB (11301): wm8775: remove legacy code for old-style i2c API V4L/DVB (11300): cx88: convert to v4l2_subdev. V4L/DVB (11298): cx25840: remove legacy code for old-style i2c API V4L/DVB (11297): cx23885: convert to v4l2_subdev. V4L/DVB (11296): cx23885: bugfix error message if firmware is not found V4L/DVB (11295): cx23885: convert to v4l2_device. V4L/DVB (11293): uvcvideo: Add zero fill for VIDIOC_ENUM_FMT ...
Diffstat (limited to 'drivers/media/video/cx88/cx88.h')
-rw-r--r--drivers/media/video/cx88/cx88.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/drivers/media/video/cx88/cx88.h b/drivers/media/video/cx88/cx88.h
index 6025fdd23344..9a43fdf20fae 100644
--- a/drivers/media/video/cx88/cx88.h
+++ b/drivers/media/video/cx88/cx88.h
@@ -25,7 +25,7 @@
#include <linux/videodev2.h>
#include <linux/kdev_t.h>
-#include <media/v4l2-common.h>
+#include <media/v4l2-device.h>
#include <media/tuner.h>
#include <media/tveeprom.h>
#include <media/videobuf-dma-sg.h>
@@ -231,6 +231,7 @@ extern struct sram_channel cx88_sram_channels[];
#define CX88_BOARD_SATTRADE_ST4200 76
#define CX88_BOARD_TBS_8910 77
#define CX88_BOARD_PROF_6200 78
+#define CX88_BOARD_TERRATEC_CINERGY_HT_PCI_MKII 79
enum cx88_itype {
CX88_VMUX_COMPOSITE1 = 1,
@@ -302,7 +303,6 @@ struct cx88_dmaqueue {
struct btcx_riscmem stopper;
u32 count;
};
-struct cx88_core;
struct cx88_core {
struct list_head devlist;
@@ -327,6 +327,8 @@ struct cx88_core {
u32 i2c_state, i2c_rc;
/* config info -- analog */
+ struct v4l2_device v4l2_dev;
+ struct i2c_client *i2c_rtc;
unsigned int boardnr;
struct cx88_board board;
@@ -365,6 +367,22 @@ struct cx88_core {
int active_fe_id;
};
+static inline struct cx88_core *to_core(struct v4l2_device *v4l2_dev)
+{
+ return container_of(v4l2_dev, struct cx88_core, v4l2_dev);
+}
+
+#define call_all(core, o, f, args...) \
+ do { \
+ if (!core->i2c_rc) { \
+ if (core->gate_ctrl) \
+ core->gate_ctrl(core, 1); \
+ v4l2_device_call_all(&core->v4l2_dev, 0, o, f, ##args); \
+ if (core->gate_ctrl) \
+ core->gate_ctrl(core, 0); \
+ } \
+ } while (0)
+
struct cx8800_dev;
struct cx8802_dev;
@@ -610,8 +628,6 @@ extern struct videobuf_queue_ops cx8800_vbi_qops;
/* cx88-i2c.c */
extern int cx88_i2c_init(struct cx88_core *core, struct pci_dev *pci);
-extern void cx88_call_i2c_clients(struct cx88_core *core,
- unsigned int cmd, void *arg);
/* ----------------------------------------------------------- */