aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/bt8xx
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-11-17 10:05:29 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-12-29 08:16:49 -0200
commita6e3b81f6198654207c4e972e7ed91931e53e93c (patch)
tree45653b8a6a40d6c6b2ae2d31bdca69a0900fa478 /drivers/media/video/bt8xx
parentbce8d0fe4af4b3a1e46e66cd6116d6389ad0cc22 (diff)
downloadkernel_samsung_smdk4412-a6e3b81f6198654207c4e972e7ed91931e53e93c.zip
kernel_samsung_smdk4412-a6e3b81f6198654207c4e972e7ed91931e53e93c.tar.gz
kernel_samsung_smdk4412-a6e3b81f6198654207c4e972e7ed91931e53e93c.tar.bz2
[media] rc: Remove ir-common.h
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/bt8xx')
-rw-r--r--drivers/media/video/bt8xx/bttv-input.c5
-rw-r--r--drivers/media/video/bt8xx/bttv.h1
-rw-r--r--drivers/media/video/bt8xx/bttvp.h43
3 files changed, 47 insertions, 2 deletions
diff --git a/drivers/media/video/bt8xx/bttv-input.c b/drivers/media/video/bt8xx/bttv-input.c
index e8f60ab..e4df7f8 100644
--- a/drivers/media/video/bt8xx/bttv-input.c
+++ b/drivers/media/video/bt8xx/bttv-input.c
@@ -147,6 +147,11 @@ static void bttv_input_timer(unsigned long data)
* testing.
*/
+#define RC5_START(x) (((x) >> 12) & 3)
+#define RC5_TOGGLE(x) (((x) >> 11) & 1)
+#define RC5_ADDR(x) (((x) >> 6) & 31)
+#define RC5_INSTR(x) ((x) & 63)
+
/* decode raw bit pattern to RC5 code */
static u32 bttv_rc5_decode(unsigned int code)
{
diff --git a/drivers/media/video/bt8xx/bttv.h b/drivers/media/video/bt8xx/bttv.h
index 6fd2a8e..fd62bf1 100644
--- a/drivers/media/video/bt8xx/bttv.h
+++ b/drivers/media/video/bt8xx/bttv.h
@@ -17,7 +17,6 @@
#include <linux/videodev2.h>
#include <linux/i2c.h>
#include <media/v4l2-device.h>
-#include <media/ir-common.h>
#include <media/i2c-addr.h>
#include <media/tuner.h>
diff --git a/drivers/media/video/bt8xx/bttvp.h b/drivers/media/video/bt8xx/bttvp.h
index 157285b..0bbdd48 100644
--- a/drivers/media/video/bt8xx/bttvp.h
+++ b/drivers/media/video/bt8xx/bttvp.h
@@ -41,7 +41,7 @@
#include <linux/device.h>
#include <media/videobuf-dma-sg.h>
#include <media/tveeprom.h>
-#include <media/ir-common.h>
+#include <media/ir-core.h>
#include <media/ir-kbd-i2c.h>
#include "bt848.h"
@@ -120,6 +120,47 @@ struct bttv_format {
int hshift,vshift; /* for planar modes */
};
+struct card_ir {
+ struct rc_dev *dev;
+
+ char name[32];
+ char phys[32];
+#if 0
+ int users;
+ u32 running:1;
+#endif
+ /* Usual gpio signalling */
+ u32 mask_keycode;
+ u32 mask_keydown;
+ u32 mask_keyup;
+ u32 polling;
+ u32 last_gpio;
+ int shift_by;
+ int start; // What should RC5_START() be
+ int addr; // What RC5_ADDR() should be.
+ int rc5_remote_gap;
+ struct work_struct work;
+ struct timer_list timer;
+
+ /* RC5 gpio */
+ u32 rc5_gpio;
+ struct timer_list timer_end; /* timer_end for code completion */
+ u32 last_bit; /* last raw bit seen */
+ u32 code; /* raw code under construction */
+ struct timeval base_time; /* time of last seen code */
+ int active; /* building raw code */
+
+#if 0
+ /* NEC decoding */
+ u32 nec_gpio;
+ struct tasklet_struct tlet;
+
+ /* IR core raw decoding */
+ u32 raw_decode;
+#endif
+};
+
+
/* ---------------------------------------------------------- */
struct bttv_geometry {