aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx231xx/cx231xx.h
diff options
context:
space:
mode:
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 @@
23#define _CX231XX_H 23#define _CX231XX_H
24 24
25#include <linux/videodev2.h> 25#include <linux/videodev2.h>
26#include <media/videobuf-vmalloc.h> 26#include <linux/types.h>
27 27#include <linux/ioctl.h>
28#include <linux/i2c.h> 28#include <linux/i2c.h>
29#include <linux/i2c-algo-bit.h> 29#include <linux/i2c-algo-bit.h>
30#include <linux/mutex.h> 30#include <linux/mutex.h>
31
32
33#include <media/videobuf-vmalloc.h>
34#include <media/v4l2-device.h>
31#include <media/ir-kbd-i2c.h> 35#include <media/ir-kbd-i2c.h>
32#if defined(CONFIG_VIDEO_CX231XX_DVB) || \ 36#if defined(CONFIG_VIDEO_CX231XX_DVB) || \
33 defined(CONFIG_VIDEO_CX231XX_DVB_MODULE) 37 defined(CONFIG_VIDEO_CX231XX_DVB_MODULE)
@@ -447,6 +451,10 @@ struct cx231xx {
447 451
448 struct cx231xx_fmt *format; 452 struct cx231xx_fmt *format;
449 453
454 struct v4l2_device v4l2_dev;
455 struct v4l2_subdev *sd_cx25840;
456 struct v4l2_subdev *sd_tuner;
457
450 struct cx231xx_IR *ir; 458 struct cx231xx_IR *ir;
451 459
452 struct list_head devlist; 460 struct list_head devlist;
@@ -544,6 +552,13 @@ struct cx231xx {
544 552
545}; 553};
546 554
555#define cx25840_call(cx231xx, o, f, args...) \
556 v4l2_subdev_call(cx231xx->sd_cx25840, o, f, ##args)
557#define tuner_call(cx231xx, o, f, args...) \
558 v4l2_subdev_call(cx231xx->sd_tuner, o, f, ##args)
559#define call_all(dev, o, f, args...) \
560 v4l2_device_call_until_err(&dev->v4l2_dev, 0, o, f, ##args)
561
547struct cx231xx_ops { 562struct cx231xx_ops {
548 struct list_head next; 563 struct list_head next;
549 char *name; 564 char *name;
@@ -557,8 +572,6 @@ int cx231xx_set_analog_freq(struct cx231xx *dev, u32 freq);
557int cx231xx_reset_analog_tuner(struct cx231xx *dev); 572int cx231xx_reset_analog_tuner(struct cx231xx *dev);
558 573
559/* Provided by cx231xx-i2c.c */ 574/* Provided by cx231xx-i2c.c */
560void cx231xx_i2c_call_clients(struct cx231xx_i2c *bus, unsigned int cmd,
561 void *arg);
562void cx231xx_do_i2c_scan(struct cx231xx *dev, struct i2c_client *c); 575void cx231xx_do_i2c_scan(struct cx231xx *dev, struct i2c_client *c);
563int cx231xx_i2c_register(struct cx231xx_i2c *bus); 576int cx231xx_i2c_register(struct cx231xx_i2c *bus);
564int cx231xx_i2c_unregister(struct cx231xx_i2c *bus); 577int cx231xx_i2c_unregister(struct cx231xx_i2c *bus);