summaryrefslogtreecommitdiff
path: root/drivers/media/video/cx231xx/cx231xx.h
diff options
context:
space:
mode:
authorSri Deevi <Srinivasa.Deevi@conexant.com>2009-03-20 23:33:48 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-04-06 21:44:06 -0300
commitb1196126b016d0f28a99c16b27c403d0ecac501a (patch)
tree771b637e63514e40a051613e296ed6b2838f7e07 /drivers/media/video/cx231xx/cx231xx.h
parented559edf35bdefb91c7eba5ea3dfd1e939aaa782 (diff)
V4L/DVB (11128): cx231xx: convert the calls to subdev format
This patch converts cx231xx to the new v4l2 dev/subdev, doing: - Conversion of i2c calls to subdev calls; - all subdev calls to call_all(); - Corrected the header file order in cx231xx.h; - Added tuner frequency setting. Signed-off-by: Srinivasa Deevi <srinivasa.deevi@conexant.com> Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx231xx/cx231xx.h')
-rw-r--r--drivers/media/video/cx231xx/cx231xx.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/drivers/media/video/cx231xx/cx231xx.h b/drivers/media/video/cx231xx/cx231xx.h
index 7c2a162f5c41..d658e3599d86 100644
--- a/drivers/media/video/cx231xx/cx231xx.h
+++ b/drivers/media/video/cx231xx/cx231xx.h
@@ -23,11 +23,15 @@
#define _CX231XX_H
#include <linux/videodev2.h>
-#include <media/videobuf-vmalloc.h>
-
+#include <linux/types.h>
+#include <linux/ioctl.h>
#include <linux/i2c.h>
#include <linux/i2c-algo-bit.h>
#include <linux/mutex.h>
+
+
+#include <media/videobuf-vmalloc.h>
+#include <media/v4l2-device.h>
#include <media/ir-kbd-i2c.h>
#if defined(CONFIG_VIDEO_CX231XX_DVB) || \
defined(CONFIG_VIDEO_CX231XX_DVB_MODULE)
@@ -447,6 +451,10 @@ struct cx231xx {
struct cx231xx_fmt *format;
+ struct v4l2_device v4l2_dev;
+ struct v4l2_subdev *sd_cx25840;
+ struct v4l2_subdev *sd_tuner;
+
struct cx231xx_IR *ir;
struct list_head devlist;
@@ -544,6 +552,13 @@ struct cx231xx {
};
+#define cx25840_call(cx231xx, o, f, args...) \
+ v4l2_subdev_call(cx231xx->sd_cx25840, o, f, ##args)
+#define tuner_call(cx231xx, o, f, args...) \
+ v4l2_subdev_call(cx231xx->sd_tuner, o, f, ##args)
+#define call_all(dev, o, f, args...) \
+ v4l2_device_call_until_err(&dev->v4l2_dev, 0, o, f, ##args)
+
struct cx231xx_ops {
struct list_head next;
char *name;
@@ -557,8 +572,6 @@ int cx231xx_set_analog_freq(struct cx231xx *dev, u32 freq);
int cx231xx_reset_analog_tuner(struct cx231xx *dev);
/* Provided by cx231xx-i2c.c */
-void cx231xx_i2c_call_clients(struct cx231xx_i2c *bus, unsigned int cmd,
- void *arg);
void cx231xx_do_i2c_scan(struct cx231xx *dev, struct i2c_client *c);
int cx231xx_i2c_register(struct cx231xx_i2c *bus);
int cx231xx_i2c_unregister(struct cx231xx_i2c *bus);