summaryrefslogtreecommitdiff
path: root/drivers/media/video/cx231xx/cx231xx.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-10-23 13:28:33 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-12-29 08:16:28 -0200
commit9ab66912e0cd671fbea1b99e8a37d11b14d50baf (patch)
tree01fbcb21c8d3f7d90360d7c410c07152aba7ecd6 /drivers/media/video/cx231xx/cx231xx.h
parentf0551efc77b0f34a93a14d2bf96051612e352a39 (diff)
[media] cx231xx: Add a driver for I2C-based IR
Although cx231xx has a very good IR support, already supported by mceusb driver, some designs decided to add a separate I2C microcontroller chip in order to handle IR. Due to that, add a glue to ir-kbd-i2c is needed, in order to support those devices. 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.h32
1 files changed, 30 insertions, 2 deletions
diff --git a/drivers/media/video/cx231xx/cx231xx.h b/drivers/media/video/cx231xx/cx231xx.h
index 8a7d0a4aaab6..a09cef43d98d 100644
--- a/drivers/media/video/cx231xx/cx231xx.h
+++ b/drivers/media/video/cx231xx/cx231xx.h
@@ -35,6 +35,7 @@
#include <media/videobuf-vmalloc.h>
#include <media/v4l2-device.h>
#include <media/ir-core.h>
+#include <media/ir-kbd-i2c.h>
#include <media/videobuf-dvb.h>
#include "cx231xx-reg.h"
@@ -345,6 +346,10 @@ struct cx231xx_board {
/* i2c masters */
u8 tuner_i2c_master;
u8 demod_i2c_master;
+ u8 ir_i2c_master;
+
+ /* for devices with I2C chips for IR */
+ char *rc_map;
unsigned int max_range_640_480:1;
unsigned int has_dvb:1;
@@ -597,6 +602,17 @@ struct cx231xx_tsport {
void *port_priv;
};
+struct cx231xx_ir_t {
+ struct input_dev *input_dev;
+ char name[40];
+ char phys[32];
+
+ struct ir_dev_props props;
+
+ /* I2C keyboard data */
+ struct IR_i2c_init_data init_data;
+};
+
/* main device struct */
struct cx231xx {
/* generic device properties */
@@ -606,6 +622,9 @@ struct cx231xx {
struct cx231xx_board board;
+ /* For I2C IR support */
+ struct cx231xx_ir_t ir;
+
unsigned int stream_on:1; /* Locks streams */
unsigned int vbi_stream_on:1; /* Locks streams for VBI */
unsigned int has_audio_class:1;
@@ -617,8 +636,6 @@ struct cx231xx {
struct v4l2_subdev *sd_cx25840;
struct v4l2_subdev *sd_tuner;
- struct cx231xx_IR *ir;
-
struct work_struct wq_trigger; /* Trigger to start/stop audio for alsa module */
atomic_t stream_started; /* stream should be running if true */
@@ -955,6 +972,17 @@ int cx231xx_tuner_callback(void *ptr, int component, int command, int arg);
extern int cx231xx_417_register(struct cx231xx *dev);
extern void cx231xx_417_unregister(struct cx231xx *dev);
+/* cx23885-input.c */
+
+#if defined(CONFIG_VIDEO_CX231XX_RC)
+int cx231xx_ir_init(struct cx231xx *dev);
+void cx231xx_ir_exit(struct cx231xx *dev);
+#else
+#define cx231xx_ir_init(dev) (0)
+#define cx231xx_ir_exit(dev) (0)
+#endif
+
+
/* printk macros */
#define cx231xx_err(fmt, arg...) do {\