From e26b31449142a18512b57dbea515af234992ba7c Mon Sep 17 00:00:00 2001
From: Márton Németh <nm127@freemail.hu>
Date: Wed, 24 Feb 2010 17:13:29 -0300
Subject: V4L/DVB: The first two parameters of soc_camera_limit_side() are
 usually pointers  to struct v4l2_rect elements. They are signed, so adjust
 the prototype  accordingly
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This will remove the following sparse warning (see "make C=1"):

 * incorrect type in argument 1 (different signedness)
       expected unsigned int *start
       got signed int *<noident>

as well as a couple more signedness mismatches.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 include/media/soc_camera.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'include/media')

diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h
index 9d69f01b6fa..5a173652cf4 100644
--- a/include/media/soc_camera.h
+++ b/include/media/soc_camera.h
@@ -266,8 +266,8 @@ static inline unsigned long soc_camera_bus_param_compatible(
 		common_flags;
 }
 
-static inline void soc_camera_limit_side(unsigned int *start,
-		unsigned int *length, unsigned int start_min,
+static inline void soc_camera_limit_side(int *start, int *length,
+		unsigned int start_min,
 		unsigned int length_min, unsigned int length_max)
 {
 	if (*length < length_min)
-- 
cgit v1.2.3-18-g5258


From 4f9fb5ed020324d6c151db34460df572b0fdc491 Mon Sep 17 00:00:00 2001
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Date: Tue, 18 May 2010 00:46:09 -0300
Subject: V4L/DVB: soc-camera: add runtime pm support for subdevices

To save power soc-camera powers subdevices down, when they are not in use,
if this is supported by the platform. However, the V4L standard dictates,
that video nodes shall preserve configuration between uses. This requires
runtime power management, which is implemented by this patch. It allows
subdevice drivers to specify their runtime power-management methods, by
assigning a type to the video device.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 include/media/soc_camera.h | 8 ++++++++
 1 file changed, 8 insertions(+)

(limited to 'include/media')

diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h
index 5a173652cf4..c9a5bbfa6ab 100644
--- a/include/media/soc_camera.h
+++ b/include/media/soc_camera.h
@@ -284,4 +284,12 @@ static inline void soc_camera_limit_side(int *start, int *length,
 extern unsigned long soc_camera_apply_sensor_flags(struct soc_camera_link *icl,
 						   unsigned long flags);
 
+/* This is only temporary here - until v4l2-subdev begins to link to video_device */
+#include <linux/i2c.h>
+static inline struct video_device *soc_camera_i2c_to_vdev(struct i2c_client *client)
+{
+	struct soc_camera_device *icd = client->dev.platform_data;
+	return icd->vdev;
+}
+
 #endif
-- 
cgit v1.2.3-18-g5258


From 945cdfa2c99e2a3f5ead11519ba11ed1df2dd5c1 Mon Sep 17 00:00:00 2001
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Date: Thu, 11 Mar 2010 12:41:56 -0300
Subject: V4L/DVB: ir: use a real device instead of a virtual class

Change the ir-sysfs approach to create irrcv0 as a device, instead of
using class_dev. Also, change the way input is registered, in order
to make its parent to be the irrcv device.

Due to this change, now the event device is created under
/sys/class/ir/irrcv class:

/sys/class/irrcv/irrcv0/
|-- current_protocol
|-- device -> ../../../1-3
|-- input9
|   |-- capabilities
|   |   |-- abs
...

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 include/media/ir-core.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

(limited to 'include/media')

diff --git a/include/media/ir-core.h b/include/media/ir-core.h
index 61c223bc395..ce9f3476bbd 100644
--- a/include/media/ir-core.h
+++ b/include/media/ir-core.h
@@ -47,11 +47,9 @@ struct ir_dev_props {
 
 
 struct ir_input_dev {
-	struct input_dev		*dev;		/* Input device*/
+	struct device			dev;		/* device */
 	struct ir_scancode_table	rc_tab;		/* scan/key table */
 	unsigned long			devno;		/* device number */
-	struct attribute_group		attr;		/* IR attributes */
-	struct device			*class_dev;	/* virtual class dev */
 	const struct ir_dev_props	*props;		/* Device properties */
 };
 #define to_ir_input_dev(_attr) container_of(_attr, struct ir_input_dev, attr)
-- 
cgit v1.2.3-18-g5258


From 2915e5ef35d103a5ecae15d9ecc614fcd0dc48f4 Mon Sep 17 00:00:00 2001
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Date: Fri, 12 Mar 2010 11:40:13 -0300
Subject: V4L/DVB: ir-core: Add a macro to properly create IR tables

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 include/media/ir-core.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'include/media')

diff --git a/include/media/ir-core.h b/include/media/ir-core.h
index ce9f3476bbd..9ab8a777422 100644
--- a/include/media/ir-core.h
+++ b/include/media/ir-core.h
@@ -35,7 +35,8 @@ struct ir_scancode {
 struct ir_scancode_table {
 	struct ir_scancode	*scan;
 	int			size;
-	u64		ir_type;
+	u64			ir_type;
+	char			*name;
 	spinlock_t		lock;
 };
 
-- 
cgit v1.2.3-18-g5258


From 727e625cc2c114e449a78f851b0c12edac897a83 Mon Sep 17 00:00:00 2001
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Date: Fri, 12 Mar 2010 21:18:14 -0300
Subject: V4L/DVB: ir-core: export driver name used by IR via uevent

Now, both driver and keytable names are exported to userspace. This
will help userspace to decide when a table need to be replaced
by another one.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 include/media/ir-core.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'include/media')

diff --git a/include/media/ir-core.h b/include/media/ir-core.h
index 9ab8a777422..1eae72d518e 100644
--- a/include/media/ir-core.h
+++ b/include/media/ir-core.h
@@ -49,6 +49,7 @@ struct ir_dev_props {
 
 struct ir_input_dev {
 	struct device			dev;		/* device */
+	char				*driver_name;	/* Name of the driver module */
 	struct ir_scancode_table	rc_tab;		/* scan/key table */
 	unsigned long			devno;		/* device number */
 	const struct ir_dev_props	*props;		/* Device properties */
@@ -62,7 +63,8 @@ u32 ir_g_keycode_from_table(struct input_dev *input_dev,
 
 int ir_input_register(struct input_dev *dev,
 		      const struct ir_scancode_table *ir_codes,
-		      const struct ir_dev_props *props);
+		      const struct ir_dev_props *props,
+		      const char *driver_name);
 void ir_input_unregister(struct input_dev *input_dev);
 
 /* Routines from ir-sysfs.c */
-- 
cgit v1.2.3-18-g5258


From 32208d444ab6ed427d18deebc4ad783602c695ba Mon Sep 17 00:00:00 2001
From: Hans Verkuil <hverkuil@xs4all.nl>
Date: Sun, 14 Mar 2010 08:01:55 -0300
Subject: V4L/DVB: v4l2: sort chip IDs in v4l2-chip-ident.h

This list should stay sorted to make it easy to find new ID ranges when
adding new chip families.

[mchehab@redhat.com: fixed bad whitespacing]
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 include/media/v4l2-chip-ident.h | 120 +++++++++++++++++++++-------------------
 1 file changed, 62 insertions(+), 58 deletions(-)

(limited to 'include/media')

diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip-ident.h
index 56abf21dd78..bf937d3c6ba 100644
--- a/include/media/v4l2-chip-ident.h
+++ b/include/media/v4l2-chip-ident.h
@@ -25,6 +25,10 @@
 #define V4L2_CHIP_IDENT_H_
 
 /* VIDIOC_DBG_G_CHIP_IDENT: identifies the actual chip installed on the board */
+
+/* KEEP THIS LIST ORDERED BY ID!
+   Otherwise it will be hard to see which ranges are already in use when
+   adding support to a new chip family. */
 enum {
 	/* general idents: reserved range 0-49 */
 	V4L2_IDENT_NONE      = 0,       /* No chip matched */
@@ -77,17 +81,14 @@ enum {
 	V4L2_IDENT_CX23417 = 417,
 	V4L2_IDENT_CX23418 = 418,
 
-	/* module au0828 */
-	V4L2_IDENT_AU0828 = 828,
-
-	/* module indycam: just ident 2000 */
-	V4L2_IDENT_INDYCAM = 2000,
-
 	/* module bt819: reserved range 810-819 */
 	V4L2_IDENT_BT815A = 815,
 	V4L2_IDENT_BT817A = 817,
 	V4L2_IDENT_BT819A = 819,
 
+	/* module au0828 */
+	V4L2_IDENT_AU0828 = 828,
+
 	/* module bt856: just ident 856 */
 	V4L2_IDENT_BT856 = 856,
 
@@ -99,6 +100,9 @@ enum {
 	V4L2_IDENT_KS0127  = 1127,
 	V4L2_IDENT_KS0127B = 1128,
 
+	/* module indycam: just ident 2000 */
+	V4L2_IDENT_INDYCAM = 2000,
+
 	/* module vp27smpx: just ident 2700 */
 	V4L2_IDENT_VP27SMPX = 2700,
 
@@ -162,21 +166,18 @@ enum {
 	/* module saa7706h: just ident 7706 */
 	V4L2_IDENT_SAA7706H = 7706,
 
+	/* module mt9v011, just ident 8243 */
+	V4L2_IDENT_MT9V011 = 8243,
+
 	/* module wm8739: just ident 8739 */
 	V4L2_IDENT_WM8739 = 8739,
 
 	/* module wm8775: just ident 8775 */
 	V4L2_IDENT_WM8775 = 8775,
 
-	/* module tda9840: just ident 9840 */
-	V4L2_IDENT_TDA9840 = 9840,
-
 	/* module cafe_ccic, just ident 8801 */
 	V4L2_IDENT_CAFE = 8801,
 
-	/* module mt9v011, just ident 8243 */
-	V4L2_IDENT_MT9V011 = 8243,
-
 	/* module cx23885 and cx25840 */
 	V4L2_IDENT_CX23885    = 8850,
 	V4L2_IDENT_CX23885_AV = 8851, /* Integrated A/V decoder */
@@ -186,6 +187,9 @@ enum {
 	V4L2_IDENT_CX23888_AV = 8881, /* Integrated A/V decoder */
 	V4L2_IDENT_CX23888_IR = 8882, /* Integrated infrared controller */
 
+	/* module tda9840: just ident 9840 */
+	V4L2_IDENT_TDA9840 = 9840,
+
 	/* module tw9910: just ident 9910 */
 	V4L2_IDENT_TW9910 = 9910,
 
@@ -198,72 +202,70 @@ enum {
 	V4L2_IDENT_CX23101    = 23101,
 	V4L2_IDENT_CX23102    = 23102,
 
-	/* module msp3400: reserved range 34000-34999 and 44000-44999 */
+	/* module msp3400: reserved range 34000-34999 for msp34xx */
 	V4L2_IDENT_MSPX4XX  = 34000, /* generic MSPX4XX identifier, only
 					use internally (tveeprom.c). */
 
 	V4L2_IDENT_MSP3400B = 34002,
-	V4L2_IDENT_MSP3410B = 34102,
-
 	V4L2_IDENT_MSP3400C = 34003,
-	V4L2_IDENT_MSP3410C = 34103,
-
 	V4L2_IDENT_MSP3400D = 34004,
-	V4L2_IDENT_MSP3410D = 34104,
+	V4L2_IDENT_MSP3400G = 34007,
+	V4L2_IDENT_MSP3401G = 34017,
+	V4L2_IDENT_MSP3402G = 34027,
 	V4L2_IDENT_MSP3405D = 34054,
-	V4L2_IDENT_MSP3415D = 34154,
+	V4L2_IDENT_MSP3405G = 34057,
 	V4L2_IDENT_MSP3407D = 34074,
-	V4L2_IDENT_MSP3417D = 34174,
+	V4L2_IDENT_MSP3407G = 34077,
 
-	V4L2_IDENT_MSP3400G = 34007,
+	V4L2_IDENT_MSP3410B = 34102,
+	V4L2_IDENT_MSP3410C = 34103,
+	V4L2_IDENT_MSP3410D = 34104,
 	V4L2_IDENT_MSP3410G = 34107,
-	V4L2_IDENT_MSP3420G = 34207,
-	V4L2_IDENT_MSP3430G = 34307,
-	V4L2_IDENT_MSP3440G = 34407,
-	V4L2_IDENT_MSP3450G = 34507,
-	V4L2_IDENT_MSP3460G = 34607,
-
-	V4L2_IDENT_MSP3401G = 34017,
 	V4L2_IDENT_MSP3411G = 34117,
-	V4L2_IDENT_MSP3421G = 34217,
-	V4L2_IDENT_MSP3431G = 34317,
-	V4L2_IDENT_MSP3441G = 34417,
-	V4L2_IDENT_MSP3451G = 34517,
-	V4L2_IDENT_MSP3461G = 34617,
-
-	V4L2_IDENT_MSP3402G = 34027,
 	V4L2_IDENT_MSP3412G = 34127,
-	V4L2_IDENT_MSP3422G = 34227,
-	V4L2_IDENT_MSP3442G = 34427,
-	V4L2_IDENT_MSP3452G = 34527,
-
-	V4L2_IDENT_MSP3405G = 34057,
+	V4L2_IDENT_MSP3415D = 34154,
 	V4L2_IDENT_MSP3415G = 34157,
-	V4L2_IDENT_MSP3425G = 34257,
-	V4L2_IDENT_MSP3435G = 34357,
-	V4L2_IDENT_MSP3445G = 34457,
-	V4L2_IDENT_MSP3455G = 34557,
-	V4L2_IDENT_MSP3465G = 34657,
-
-	V4L2_IDENT_MSP3407G = 34077,
+	V4L2_IDENT_MSP3417D = 34174,
 	V4L2_IDENT_MSP3417G = 34177,
+
+	V4L2_IDENT_MSP3420G = 34207,
+	V4L2_IDENT_MSP3421G = 34217,
+	V4L2_IDENT_MSP3422G = 34227,
+	V4L2_IDENT_MSP3425G = 34257,
 	V4L2_IDENT_MSP3427G = 34277,
+
+	V4L2_IDENT_MSP3430G = 34307,
+	V4L2_IDENT_MSP3431G = 34317,
+	V4L2_IDENT_MSP3435G = 34357,
 	V4L2_IDENT_MSP3437G = 34377,
+
+	V4L2_IDENT_MSP3440G = 34407,
+	V4L2_IDENT_MSP3441G = 34417,
+	V4L2_IDENT_MSP3442G = 34427,
+	V4L2_IDENT_MSP3445G = 34457,
 	V4L2_IDENT_MSP3447G = 34477,
+
+	V4L2_IDENT_MSP3450G = 34507,
+	V4L2_IDENT_MSP3451G = 34517,
+	V4L2_IDENT_MSP3452G = 34527,
+	V4L2_IDENT_MSP3455G = 34557,
 	V4L2_IDENT_MSP3457G = 34577,
+
+	V4L2_IDENT_MSP3460G = 34607,
+	V4L2_IDENT_MSP3461G = 34617,
+	V4L2_IDENT_MSP3465G = 34657,
 	V4L2_IDENT_MSP3467G = 34677,
 
-	/* module msp3400: reserved range 34000-34999 and 44000-44999 */
+	/* module msp3400: reserved range 44000-44999 for msp44xx */
 	V4L2_IDENT_MSP4400G = 44007,
-	V4L2_IDENT_MSP4410G = 44107,
-	V4L2_IDENT_MSP4420G = 44207,
-	V4L2_IDENT_MSP4440G = 44407,
-	V4L2_IDENT_MSP4450G = 44507,
-
 	V4L2_IDENT_MSP4408G = 44087,
+	V4L2_IDENT_MSP4410G = 44107,
 	V4L2_IDENT_MSP4418G = 44187,
+	V4L2_IDENT_MSP4420G = 44207,
 	V4L2_IDENT_MSP4428G = 44287,
+	V4L2_IDENT_MSP4440G = 44407,
 	V4L2_IDENT_MSP4448G = 44487,
+	V4L2_IDENT_MSP4450G = 44507,
 	V4L2_IDENT_MSP4458G = 44587,
 
 	/* Micron CMOS sensor chips: 45000-45099 */
@@ -282,6 +284,12 @@ enum {
 	/* HV7131R CMOS sensor: just ident 46000 */
 	V4L2_IDENT_HV7131R		= 46000,
 
+	/* Sharp RJ54N1CB0C, 0xCB0C = 51980 */
+	V4L2_IDENT_RJ54N1CB0C = 51980,
+
+	/* module m52790: just ident 52790 */
+	V4L2_IDENT_M52790 = 52790,
+
 	/* module cs53132a: just ident 53132 */
 	V4L2_IDENT_CS53l32A = 53132,
 
@@ -291,11 +299,7 @@ enum {
 	/* module upd64083: just ident 64083 */
 	V4L2_IDENT_UPD64083 = 64083,
 
-	/* module m52790: just ident 52790 */
-	V4L2_IDENT_M52790 = 52790,
-
-	/* Sharp RJ54N1CB0C, 0xCB0C = 51980 */
-	V4L2_IDENT_RJ54N1CB0C = 51980,
+	/* Don't just add new IDs at the end: KEEP THIS LIST ORDERED BY ID! */
 };
 
 #endif
-- 
cgit v1.2.3-18-g5258


From 85e092190b5f7dfe9b78556440472c5590a32b4e Mon Sep 17 00:00:00 2001
From: Dmitri Belimov <d.belimov@gmail.com>
Date: Tue, 23 Mar 2010 11:23:29 -0300
Subject: V4L/DVB: Add SPI support to V4L2

Add support SPI bus to v4l2. Useful for control some device with SPI bus like
hardware MPEG2 encoders and etc.

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 include/media/v4l2-common.h | 19 +++++++++++++++++++
 include/media/v4l2-subdev.h |  2 ++
 2 files changed, 21 insertions(+)

(limited to 'include/media')

diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h
index 1c7b259f341..3b2efdc6d06 100644
--- a/include/media/v4l2-common.h
+++ b/include/media/v4l2-common.h
@@ -184,6 +184,25 @@ const unsigned short *v4l2_i2c_tuner_addrs(enum v4l2_i2c_tuner_type type);
 
 /* ------------------------------------------------------------------------- */
 
+/* SPI Helper functions */
+#if defined(CONFIG_SPI)
+
+#include <linux/spi/spi.h>
+
+struct spi_device;
+
+/* Load an spi module and return an initialized v4l2_subdev struct.
+   The client_type argument is the name of the chip that's on the adapter. */
+struct v4l2_subdev *v4l2_spi_new_subdev(struct v4l2_device *v4l2_dev,
+		struct spi_master *master, struct spi_board_info *info);
+
+/* Initialize an v4l2_subdev with data from an spi_device struct */
+void v4l2_spi_subdev_init(struct v4l2_subdev *sd, struct spi_device *spi,
+		const struct v4l2_subdev_ops *ops);
+#endif
+
+/* ------------------------------------------------------------------------- */
+
 /* Note: these remaining ioctls/structs should be removed as well, but they are
    still used in tuner-simple.c (TUNER_SET_CONFIG), cx18/ivtv (RESET) and
    v4l2-int-device.h (v4l2_routing). To remove these ioctls some more cleanup
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index 2bcdca0a57f..09758789be0 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -387,6 +387,8 @@ struct v4l2_subdev_ops {
 
 /* Set this flag if this subdev is a i2c device. */
 #define V4L2_SUBDEV_FL_IS_I2C (1U << 0)
+/* Set this flag if this subdev is a spi device. */
+#define V4L2_SUBDEV_FL_IS_SPI (1U << 1)
 
 /* Each instance of a subdev driver should create this struct, either
    stand-alone or embedded in a larger struct.
-- 
cgit v1.2.3-18-g5258


From 7a02264ca9ec5409e22b9d41f32b431d08eadbce Mon Sep 17 00:00:00 2001
From: Pawel Osciak <p.osciak@samsung.com>
Date: Wed, 17 Mar 2010 04:01:04 -0300
Subject: V4L/DVB: v4l: videobuf: code cleanup

Make videobuf pass checkpatch; minor code cleanups.

Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 include/media/videobuf-core.h    | 10 +++++-----
 include/media/videobuf-dma-sg.h  | 27 +++++++++++++++------------
 include/media/videobuf-vmalloc.h | 12 ++++++------
 3 files changed, 26 insertions(+), 23 deletions(-)

(limited to 'include/media')

diff --git a/include/media/videobuf-core.h b/include/media/videobuf-core.h
index 316fdccdcaa..b1f7bf423fd 100644
--- a/include/media/videobuf-core.h
+++ b/include/media/videobuf-core.h
@@ -129,14 +129,14 @@ struct videobuf_qtype_ops {
 
 	void *(*alloc)		(size_t size);
 	void *(*vmalloc)	(struct videobuf_buffer *buf);
-	int (*iolock)		(struct videobuf_queue* q,
+	int (*iolock)		(struct videobuf_queue *q,
 				 struct videobuf_buffer *vb,
 				 struct v4l2_framebuffer *fbuf);
 	int (*mmap)		(struct videobuf_queue *q,
 				 unsigned int *count,
 				 unsigned int *size,
 				 enum v4l2_memory memory);
-	int (*sync)		(struct videobuf_queue* q,
+	int (*sync)		(struct videobuf_queue *q,
 				 struct videobuf_buffer *buf);
 	int (*video_copy_to_user)(struct videobuf_queue *q,
 				 char __user *data,
@@ -185,14 +185,14 @@ struct videobuf_queue {
 };
 
 int videobuf_waiton(struct videobuf_buffer *vb, int non_blocking, int intr);
-int videobuf_iolock(struct videobuf_queue* q, struct videobuf_buffer *vb,
+int videobuf_iolock(struct videobuf_queue *q, struct videobuf_buffer *vb,
 		struct v4l2_framebuffer *fbuf);
 
 void *videobuf_alloc(struct videobuf_queue* q);
 
 /* Used on videobuf-dvb */
-void *videobuf_queue_to_vmalloc (struct videobuf_queue* q,
-				 struct videobuf_buffer *buf);
+void *videobuf_queue_to_vmalloc(struct videobuf_queue *q,
+				struct videobuf_buffer *buf);
 
 void videobuf_queue_core_init(struct videobuf_queue *q,
 			 const struct videobuf_queue_ops *ops,
diff --git a/include/media/videobuf-dma-sg.h b/include/media/videobuf-dma-sg.h
index 53e72f78717..dbfd8cf7b7c 100644
--- a/include/media/videobuf-dma-sg.h
+++ b/include/media/videobuf-dma-sg.h
@@ -17,6 +17,8 @@
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2
  */
+#ifndef _VIDEOBUF_DMA_SG_H
+#define _VIDEOBUF_DMA_SG_H
 
 #include <media/videobuf-core.h>
 
@@ -27,14 +29,14 @@
  * block (NULL on errors).  Memory for the scatterlist is allocated
  * using kmalloc.  The caller must free the memory.
  */
-struct scatterlist* videobuf_vmalloc_to_sg(unsigned char *virt, int nr_pages);
+struct scatterlist *videobuf_vmalloc_to_sg(unsigned char *virt, int nr_pages);
 
 /*
  * Return a scatterlist for a an array of userpages (NULL on errors).
  * Memory for the scatterlist is allocated using kmalloc.  The caller
  * must free the memory.
  */
-struct scatterlist* videobuf_pages_to_sg(struct page **pages, int nr_pages,
+struct scatterlist *videobuf_pages_to_sg(struct page **pages, int nr_pages,
 					 int offset);
 
 /* --------------------------------------------------------------------- */
@@ -78,8 +80,7 @@ struct videobuf_dmabuf {
 	int                 direction;
 };
 
-struct videobuf_dma_sg_memory
-{
+struct videobuf_dma_sg_memory {
 	u32                 magic;
 
 	/* for mmap'ed buffers */
@@ -95,14 +96,14 @@ int videobuf_dma_init_overlay(struct videobuf_dmabuf *dma, int direction,
 			      dma_addr_t addr, int nr_pages);
 int videobuf_dma_free(struct videobuf_dmabuf *dma);
 
-int videobuf_dma_map(struct videobuf_queue* q,struct videobuf_dmabuf *dma);
-int videobuf_dma_sync(struct videobuf_queue* q,struct videobuf_dmabuf *dma);
-int videobuf_dma_unmap(struct videobuf_queue* q,struct videobuf_dmabuf *dma);
-struct videobuf_dmabuf *videobuf_to_dma (struct videobuf_buffer *buf);
+int videobuf_dma_map(struct videobuf_queue *q, struct videobuf_dmabuf *dma);
+int videobuf_dma_sync(struct videobuf_queue *q, struct videobuf_dmabuf *dma);
+int videobuf_dma_unmap(struct videobuf_queue *q, struct videobuf_dmabuf *dma);
+struct videobuf_dmabuf *videobuf_to_dma(struct videobuf_buffer *buf);
 
 void *videobuf_sg_alloc(size_t size);
 
-void videobuf_queue_sg_init(struct videobuf_queue* q,
+void videobuf_queue_sg_init(struct videobuf_queue *q,
 			 const struct videobuf_queue_ops *ops,
 			 struct device *dev,
 			 spinlock_t *irqlock,
@@ -111,9 +112,11 @@ void videobuf_queue_sg_init(struct videobuf_queue* q,
 			 unsigned int msize,
 			 void *priv);
 
-	/*FIXME: these variants are used only on *-alsa code, where videobuf is
-	 * used without queue
-	 */
+/*FIXME: these variants are used only on *-alsa code, where videobuf is
+ * used without queue
+ */
 int videobuf_sg_dma_map(struct device *dev, struct videobuf_dmabuf *dma);
 int videobuf_sg_dma_unmap(struct device *dev, struct videobuf_dmabuf *dma);
 
+#endif /* _VIDEOBUF_DMA_SG_H */
+
diff --git a/include/media/videobuf-vmalloc.h b/include/media/videobuf-vmalloc.h
index 4b419a257a7..851eb1a2ff2 100644
--- a/include/media/videobuf-vmalloc.h
+++ b/include/media/videobuf-vmalloc.h
@@ -19,17 +19,17 @@
 
 /* --------------------------------------------------------------------- */
 
-struct videobuf_vmalloc_memory
-{
+struct videobuf_vmalloc_memory {
 	u32                 magic;
 
 	void                *vmalloc;
 
-	/* remap_vmalloc_range seems to need to run after mmap() on some cases */
+	/* remap_vmalloc_range seems to need to run
+	 * after mmap() on some cases */
 	struct vm_area_struct *vma;
 };
 
-void videobuf_queue_vmalloc_init(struct videobuf_queue* q,
+void videobuf_queue_vmalloc_init(struct videobuf_queue *q,
 			 const struct videobuf_queue_ops *ops,
 			 struct device *dev,
 			 spinlock_t *irqlock,
@@ -38,8 +38,8 @@ void videobuf_queue_vmalloc_init(struct videobuf_queue* q,
 			 unsigned int msize,
 			 void *priv);
 
-void *videobuf_to_vmalloc (struct videobuf_buffer *buf);
+void *videobuf_to_vmalloc(struct videobuf_buffer *buf);
 
-void videobuf_vmalloc_free (struct videobuf_buffer *buf);
+void videobuf_vmalloc_free(struct videobuf_buffer *buf);
 
 #endif
-- 
cgit v1.2.3-18-g5258


From 085b54a24fd0c7353cd1b2d462879b7a4a4070fa Mon Sep 17 00:00:00 2001
From: Vaibhav Hiremath <hvaibhav@ti.com>
Date: Sat, 27 Mar 2010 09:37:07 -0300
Subject: V4L/DVB: V4L: vpfe_capture: Add call back function for interrupt
 clear for vpfe_cfg

For the devices like AM3517, it is expected that driver clears the
interrupt in ISR. Since this is device spcific, callback function
added to the platform_data.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Muralidharan Karicheri <mkaricheri@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 include/media/davinci/vpfe_capture.h | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'include/media')

diff --git a/include/media/davinci/vpfe_capture.h b/include/media/davinci/vpfe_capture.h
index 4314a5f6a08..cc973ed845a 100644
--- a/include/media/davinci/vpfe_capture.h
+++ b/include/media/davinci/vpfe_capture.h
@@ -94,6 +94,8 @@ struct vpfe_config {
 	/* vpfe clock */
 	struct clk *vpssclk;
 	struct clk *slaveclk;
+	/* Function for Clearing the interrupt */
+	void (*clr_intr)(int vdint);
 };
 
 struct vpfe_device {
-- 
cgit v1.2.3-18-g5258


From d152b8b62421c441bea4eb5d92e9d1b4883fd201 Mon Sep 17 00:00:00 2001
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Date: Sat, 20 Mar 2010 00:23:30 -0300
Subject: V4L/DVB: saa7134: use a full scancode table for M135A

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 include/media/ir-common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'include/media')

diff --git a/include/media/ir-common.h b/include/media/ir-common.h
index c66298062d3..c30b28384d8 100644
--- a/include/media/ir-common.h
+++ b/include/media/ir-common.h
@@ -102,7 +102,7 @@ void ir_rc5_timer_keyup(unsigned long data);
 extern struct ir_scancode_table ir_codes_empty_table;
 extern struct ir_scancode_table ir_codes_avermedia_table;
 extern struct ir_scancode_table ir_codes_avermedia_dvbt_table;
-extern struct ir_scancode_table ir_codes_avermedia_m135a_table;
+extern struct ir_scancode_table ir_codes_avermedia_m135a_rm_jx_table;
 extern struct ir_scancode_table ir_codes_avermedia_cardbus_table;
 extern struct ir_scancode_table ir_codes_apac_viewcomp_table;
 extern struct ir_scancode_table ir_codes_pixelview_table;
-- 
cgit v1.2.3-18-g5258


From 0210894956cf57d525d56341cc3e0f3d5d2db659 Mon Sep 17 00:00:00 2001
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Date: Sat, 20 Mar 2010 00:25:37 -0300
Subject: V4L/DVB: saa7134: add code to allow changing IR protocol

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 include/media/ir-common.h | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'include/media')

diff --git a/include/media/ir-common.h b/include/media/ir-common.h
index c30b28384d8..41469b79ad1 100644
--- a/include/media/ir-common.h
+++ b/include/media/ir-common.h
@@ -51,6 +51,9 @@ struct card_ir {
 	char                    name[32];
 	char                    phys[32];
 
+	u32			running:1;
+	struct ir_dev_props	props;
+
 	/* Usual gpio signalling */
 
 	u32                     mask_keycode;
-- 
cgit v1.2.3-18-g5258


From a3572c34da8dacc78a629211a91cf34e9b408701 Mon Sep 17 00:00:00 2001
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Date: Sat, 20 Mar 2010 20:59:44 -0300
Subject: V4L/DVB: ir-core: Add logic to decode IR protocols at the IR core

Adds a method to pass IR raw pulse/code events into ir-core. This is
needed in order to support LIRC. It also helps to move common code
from the drivers into the core.

In order to allow testing, it implements a simple NEC protocol decoder
at ir-nec-decoder.c file. The logic is about the same used at saa7134
driver that handles Avermedia M135A and Encore FM53 boards.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 include/media/ir-common.h |  3 +++
 include/media/ir-core.h   | 32 ++++++++++++++++++++++++++++++++
 2 files changed, 35 insertions(+)

(limited to 'include/media')

diff --git a/include/media/ir-common.h b/include/media/ir-common.h
index 41469b79ad1..87f2ec78deb 100644
--- a/include/media/ir-common.h
+++ b/include/media/ir-common.h
@@ -82,6 +82,9 @@ struct card_ir {
 	/* NEC decoding */
 	u32			nec_gpio;
 	struct tasklet_struct   tlet;
+
+	/* IR core raw decoding */
+	u32			raw_decode;
 };
 
 /* Routines from ir-functions.c */
diff --git a/include/media/ir-core.h b/include/media/ir-core.h
index 1eae72d518e..369969d9077 100644
--- a/include/media/ir-core.h
+++ b/include/media/ir-core.h
@@ -16,6 +16,8 @@
 
 #include <linux/input.h>
 #include <linux/spinlock.h>
+#include <linux/kfifo.h>
+#include <linux/time.h>
 
 extern int ir_core_debug;
 #define IR_dprintk(level, fmt, arg...)	if (ir_core_debug >= level) \
@@ -27,6 +29,13 @@ extern int ir_core_debug;
 #define IR_TYPE_NEC	(1  << 2)
 #define IR_TYPE_OTHER	(((u64)1) << 63l)
 
+enum raw_event_type {
+	IR_SPACE	= (1 << 0),
+	IR_PULSE	= (1 << 1),
+	IR_START_EVENT	= (1 << 2),
+	IR_STOP_EVENT	= (1 << 3),
+};
+
 struct ir_scancode {
 	u16	scancode;
 	u32	keycode;
@@ -46,6 +55,15 @@ struct ir_dev_props {
 	int (*change_protocol)(void *priv, u64 ir_type);
 };
 
+struct ir_raw_event {
+	struct timespec		delta;	/* Time spent before event */
+	enum raw_event_type	type;	/* event type */
+};
+
+struct ir_raw_event_ctrl {
+	struct kfifo			kfifo;		/* fifo for the pulse/space events */
+	struct timespec			last_event;	/* when last event occurred */
+};
 
 struct ir_input_dev {
 	struct device			dev;		/* device */
@@ -53,7 +71,9 @@ struct ir_input_dev {
 	struct ir_scancode_table	rc_tab;		/* scan/key table */
 	unsigned long			devno;		/* device number */
 	const struct ir_dev_props	*props;		/* Device properties */
+	struct ir_raw_event_ctrl	*raw;		/* for raw pulse/space events */
 };
+
 #define to_ir_input_dev(_attr) container_of(_attr, struct ir_input_dev, attr)
 
 /* Routines from ir-keytable.c */
@@ -72,4 +92,16 @@ void ir_input_unregister(struct input_dev *input_dev);
 int ir_register_class(struct input_dev *input_dev);
 void ir_unregister_class(struct input_dev *input_dev);
 
+/* Routines from ir-raw-event.c */
+int ir_raw_event_register(struct input_dev *input_dev);
+void ir_raw_event_unregister(struct input_dev *input_dev);
+int ir_raw_event_store(struct input_dev *input_dev, enum raw_event_type type);
+int ir_raw_event_handle(struct input_dev *input_dev);
+
+/* from ir-nec-decoder.c */
+int ir_nec_decode(struct input_dev *input_dev,
+		  struct ir_raw_event *evs,
+		  int len);
+
+
 #endif
-- 
cgit v1.2.3-18-g5258


From 6660de568d164e4eda6617dadcb999c96e62203f Mon Sep 17 00:00:00 2001
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Date: Sun, 21 Mar 2010 12:15:16 -0300
Subject: V4L/DVB: ir-core: add two functions to report keyup/keydown events

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 include/media/ir-core.h | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'include/media')

diff --git a/include/media/ir-core.h b/include/media/ir-core.h
index 369969d9077..198fd61f0da 100644
--- a/include/media/ir-core.h
+++ b/include/media/ir-core.h
@@ -72,6 +72,10 @@ struct ir_input_dev {
 	unsigned long			devno;		/* device number */
 	const struct ir_dev_props	*props;		/* Device properties */
 	struct ir_raw_event_ctrl	*raw;		/* for raw pulse/space events */
+
+	/* key info - needed by IR keycode handlers */
+	u32				keycode;	/* linux key code */
+	int				keypressed;	/* current state */
 };
 
 #define to_ir_input_dev(_attr) container_of(_attr, struct ir_input_dev, attr)
-- 
cgit v1.2.3-18-g5258


From ada39630c758c5c3098f4fc1361103ea2bc1afe0 Mon Sep 17 00:00:00 2001
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Date: Sun, 21 Mar 2010 12:24:24 -0300
Subject: V4L/DVB: ir-core/saa7134: Move ir keyup/keydown code to the ir-core

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 include/media/ir-core.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'include/media')

diff --git a/include/media/ir-core.h b/include/media/ir-core.h
index 198fd61f0da..9e03528a767 100644
--- a/include/media/ir-core.h
+++ b/include/media/ir-core.h
@@ -84,7 +84,8 @@ struct ir_input_dev {
 
 u32 ir_g_keycode_from_table(struct input_dev *input_dev,
 			    u32 scancode);
-
+void ir_keyup(struct input_dev *dev);
+void ir_keydown(struct input_dev *dev, int scancode);
 int ir_input_register(struct input_dev *dev,
 		      const struct ir_scancode_table *ir_codes,
 		      const struct ir_dev_props *props,
-- 
cgit v1.2.3-18-g5258


From 9f1547829a6f39fe6b2da22653dff40502f3d568 Mon Sep 17 00:00:00 2001
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Date: Sun, 21 Mar 2010 13:00:55 -0300
Subject: V4L/DVB: saa7134: don't wait too much to generate an IR event on
 raw_decode

At raw_decode mode, the key is processed after the end of a timer. The
previous code resets the timer every time something is received at the IR
port. While this works fine with IR's that don't implement repeat, like
Avermedia RM-JX IR, it keeps waiting until keydown, on IR's that implement
NEC repeat command, like the Terratec yellow.

The solution is to change the behaviour to do the timeout after the first
received data.

The timeout is currently set to 15 ms, as it works fine with NEC protcocol.
It may need some adjustments to support other protocols and to better handle
spurious detections that may happen with some IR sensors.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 include/media/ir-core.h | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'include/media')

diff --git a/include/media/ir-core.h b/include/media/ir-core.h
index 9e03528a767..8d8ed7e06cd 100644
--- a/include/media/ir-core.h
+++ b/include/media/ir-core.h
@@ -18,6 +18,7 @@
 #include <linux/spinlock.h>
 #include <linux/kfifo.h>
 #include <linux/time.h>
+#include <linux/timer.h>
 
 extern int ir_core_debug;
 #define IR_dprintk(level, fmt, arg...)	if (ir_core_debug >= level) \
@@ -63,6 +64,7 @@ struct ir_raw_event {
 struct ir_raw_event_ctrl {
 	struct kfifo			kfifo;		/* fifo for the pulse/space events */
 	struct timespec			last_event;	/* when last event occurred */
+	struct timer_list		timer_keyup;	/* timer for key release */
 };
 
 struct ir_input_dev {
-- 
cgit v1.2.3-18-g5258


From 995187bed30c0545e8da88372e9807da0a85911e Mon Sep 17 00:00:00 2001
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Date: Wed, 24 Mar 2010 20:47:53 -0300
Subject: V4L/DVB: ir-core: dynamically load the compiled IR protocols

Instead of hardcoding the protocols into ir-core, add a register interface
for the IR protocol decoders, and convert ir-nec-decoder into a client of
ir-core.

With this approach, it is possible to dynamically load the needed IR protocols,
and to add a RAW IR interface module, registered as one IR raw protocol decoder.

This patch opens a way to register a lirc_dev interface to work as an userspace
IR protocol decoder.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 include/media/ir-core.h | 29 ++++++++++++++++++++++++-----
 1 file changed, 24 insertions(+), 5 deletions(-)

(limited to 'include/media')

diff --git a/include/media/ir-core.h b/include/media/ir-core.h
index 8d8ed7e06cd..c377bf47a05 100644
--- a/include/media/ir-core.h
+++ b/include/media/ir-core.h
@@ -1,6 +1,8 @@
 /*
  * Remote Controller core header
  *
+ * Copyright (C) 2009-2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
+ *
  * This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation version 2 of the License.
@@ -80,6 +82,14 @@ struct ir_input_dev {
 	int				keypressed;	/* current state */
 };
 
+struct ir_raw_handler {
+	struct list_head list;
+
+	int (*decode)(struct input_dev *input_dev,
+		      struct ir_raw_event *evs,
+		      int len);
+};
+
 #define to_ir_input_dev(_attr) container_of(_attr, struct ir_input_dev, attr)
 
 /* Routines from ir-keytable.c */
@@ -104,11 +114,20 @@ int ir_raw_event_register(struct input_dev *input_dev);
 void ir_raw_event_unregister(struct input_dev *input_dev);
 int ir_raw_event_store(struct input_dev *input_dev, enum raw_event_type type);
 int ir_raw_event_handle(struct input_dev *input_dev);
+int ir_raw_handler_register(struct ir_raw_handler *ir_raw_handler);
+void ir_raw_handler_unregister(struct ir_raw_handler *ir_raw_handler);
 
-/* from ir-nec-decoder.c */
-int ir_nec_decode(struct input_dev *input_dev,
-		  struct ir_raw_event *evs,
-		  int len);
-
+#ifdef MODULE
+void ir_raw_init(void);
+#else
+#define ir_raw_init() 0
+#endif
 
+/* from ir-nec-decoder.c */
+#ifdef CONFIG_IR_NEC_DECODER_MODULE
+#define load_nec_decode()	request_module("ir-nec-decoder")
+#else
+#define load_nec_decode()	0
 #endif
+
+#endif /* _IR_CORE */
-- 
cgit v1.2.3-18-g5258


From 93c312ff21b0a53e701a45741887208297646a1a Mon Sep 17 00:00:00 2001
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Date: Thu, 25 Mar 2010 21:13:43 -0300
Subject: V4L/DVB: ir-core: prepare to add more operations for ir decoders

Some decoders and a lirc_dev interface may need some other operations to work.
For example: IR device register/unregister and ir_keydown events may need to
be tracked.

As some operations can occur in interrupt time, and a lock is needed to prevent
un-registering a decode while decoding a key, the lock needed to be convert
into a spin lock.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 include/media/ir-core.h | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

(limited to 'include/media')

diff --git a/include/media/ir-core.h b/include/media/ir-core.h
index c377bf47a05..c704fa7cc11 100644
--- a/include/media/ir-core.h
+++ b/include/media/ir-core.h
@@ -88,6 +88,8 @@ struct ir_raw_handler {
 	int (*decode)(struct input_dev *input_dev,
 		      struct ir_raw_event *evs,
 		      int len);
+	int (*raw_register)(struct input_dev *input_dev);
+	int (*raw_unregister)(struct input_dev *input_dev);
 };
 
 #define to_ir_input_dev(_attr) container_of(_attr, struct ir_input_dev, attr)
@@ -116,12 +118,7 @@ int ir_raw_event_store(struct input_dev *input_dev, enum raw_event_type type);
 int ir_raw_event_handle(struct input_dev *input_dev);
 int ir_raw_handler_register(struct ir_raw_handler *ir_raw_handler);
 void ir_raw_handler_unregister(struct ir_raw_handler *ir_raw_handler);
-
-#ifdef MODULE
 void ir_raw_init(void);
-#else
-#define ir_raw_init() 0
-#endif
 
 /* from ir-nec-decoder.c */
 #ifdef CONFIG_IR_NEC_DECODER_MODULE
-- 
cgit v1.2.3-18-g5258


From 716aab44df8bb9bdf16abea9013890274329b61f Mon Sep 17 00:00:00 2001
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Date: Wed, 31 Mar 2010 14:40:35 -0300
Subject: V4L/DVB: ir-core: Add callbacks for input/evdev open/close on IR core

Especially when IR needs to do polling, it generates lots of wakeups per
second. This makes no sense, if the input event device is closed.

Adds a callback handler to the IR hardware driver, to allow registering
an open/close ops.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 include/media/ir-common.h | 1 +
 include/media/ir-core.h   | 2 ++
 2 files changed, 3 insertions(+)

(limited to 'include/media')

diff --git a/include/media/ir-common.h b/include/media/ir-common.h
index 87f2ec78deb..e403a9a5281 100644
--- a/include/media/ir-common.h
+++ b/include/media/ir-common.h
@@ -50,6 +50,7 @@ struct card_ir {
 	struct ir_input_state   ir;
 	char                    name[32];
 	char                    phys[32];
+	int			users;
 
 	u32			running:1;
 	struct ir_dev_props	props;
diff --git a/include/media/ir-core.h b/include/media/ir-core.h
index c704fa7cc11..9a2f3084ffe 100644
--- a/include/media/ir-core.h
+++ b/include/media/ir-core.h
@@ -56,6 +56,8 @@ struct ir_dev_props {
 	unsigned long allowed_protos;
 	void 		*priv;
 	int (*change_protocol)(void *priv, u64 ir_type);
+	int (*open)(void *priv);
+	void (*close)(void *priv);
 };
 
 struct ir_raw_event {
-- 
cgit v1.2.3-18-g5258


From d53b213c5ca7d5a944d471b72b068714bb16e8dc Mon Sep 17 00:00:00 2001
From: Dmitri Belimov <d.belimov@gmail.com>
Date: Thu, 18 Mar 2010 04:00:19 -0300
Subject: V4L/DVB: Add CHIP ID of the uPD61151

Add CHIP ID of the NEC MPEG2 encoders uPD61151 and uPD61152.

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 include/media/v4l2-chip-ident.h | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'include/media')

diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip-ident.h
index bf937d3c6ba..42759db6794 100644
--- a/include/media/v4l2-chip-ident.h
+++ b/include/media/v4l2-chip-ident.h
@@ -293,6 +293,11 @@ enum {
 	/* module cs53132a: just ident 53132 */
 	V4L2_IDENT_CS53l32A = 53132,
 
+	/* modules upd61151 MPEG2 encoder: just ident 54000 */
+	V4L2_IDENT_UPD61161 = 54000,
+	/* modules upd61152 MPEG2 encoder with AC3: just ident 54001 */
+	V4L2_IDENT_UPD61162 = 54001,
+
 	/* module upd64031a: just ident 64031 */
 	V4L2_IDENT_UPD64031A = 64031,
 
-- 
cgit v1.2.3-18-g5258


From 8b75acb52f477099d7e5203994dac43cc5f599a0 Mon Sep 17 00:00:00 2001
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Date: Thu, 1 Apr 2010 21:05:21 -0300
Subject: V4L/DVB: ir-common: Use a function to declare an IR table

This is the first patch of a series of changes that will break the IR
tables into a series of small modules that can be dynamically loaded,
or just loaded from userspace.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 include/media/ir-common.h | 136 ++++++++++++++++++++++++----------------------
 1 file changed, 71 insertions(+), 65 deletions(-)

(limited to 'include/media')

diff --git a/include/media/ir-common.h b/include/media/ir-common.h
index e403a9a5281..800fc980e0e 100644
--- a/include/media/ir-common.h
+++ b/include/media/ir-common.h
@@ -106,69 +106,75 @@ void ir_rc5_timer_keyup(unsigned long data);
 
 /* scancode->keycode map tables from ir-keymaps.c */
 
-extern struct ir_scancode_table ir_codes_empty_table;
-extern struct ir_scancode_table ir_codes_avermedia_table;
-extern struct ir_scancode_table ir_codes_avermedia_dvbt_table;
-extern struct ir_scancode_table ir_codes_avermedia_m135a_rm_jx_table;
-extern struct ir_scancode_table ir_codes_avermedia_cardbus_table;
-extern struct ir_scancode_table ir_codes_apac_viewcomp_table;
-extern struct ir_scancode_table ir_codes_pixelview_table;
-extern struct ir_scancode_table ir_codes_pixelview_new_table;
-extern struct ir_scancode_table ir_codes_nebula_table;
-extern struct ir_scancode_table ir_codes_dntv_live_dvb_t_table;
-extern struct ir_scancode_table ir_codes_iodata_bctv7e_table;
-extern struct ir_scancode_table ir_codes_adstech_dvb_t_pci_table;
-extern struct ir_scancode_table ir_codes_msi_tvanywhere_table;
-extern struct ir_scancode_table ir_codes_cinergy_1400_table;
-extern struct ir_scancode_table ir_codes_avertv_303_table;
-extern struct ir_scancode_table ir_codes_dntv_live_dvbt_pro_table;
-extern struct ir_scancode_table ir_codes_em_terratec_table;
-extern struct ir_scancode_table ir_codes_pinnacle_grey_table;
-extern struct ir_scancode_table ir_codes_flyvideo_table;
-extern struct ir_scancode_table ir_codes_flydvb_table;
-extern struct ir_scancode_table ir_codes_cinergy_table;
-extern struct ir_scancode_table ir_codes_eztv_table;
-extern struct ir_scancode_table ir_codes_avermedia_table;
-extern struct ir_scancode_table ir_codes_videomate_tv_pvr_table;
-extern struct ir_scancode_table ir_codes_manli_table;
-extern struct ir_scancode_table ir_codes_gotview7135_table;
-extern struct ir_scancode_table ir_codes_purpletv_table;
-extern struct ir_scancode_table ir_codes_pctv_sedna_table;
-extern struct ir_scancode_table ir_codes_pv951_table;
-extern struct ir_scancode_table ir_codes_rc5_tv_table;
-extern struct ir_scancode_table ir_codes_winfast_table;
-extern struct ir_scancode_table ir_codes_pinnacle_color_table;
-extern struct ir_scancode_table ir_codes_hauppauge_new_table;
-extern struct ir_scancode_table ir_codes_rc5_hauppauge_new_table;
-extern struct ir_scancode_table ir_codes_npgtech_table;
-extern struct ir_scancode_table ir_codes_norwood_table;
-extern struct ir_scancode_table ir_codes_proteus_2309_table;
-extern struct ir_scancode_table ir_codes_budget_ci_old_table;
-extern struct ir_scancode_table ir_codes_asus_pc39_table;
-extern struct ir_scancode_table ir_codes_encore_enltv_table;
-extern struct ir_scancode_table ir_codes_encore_enltv2_table;
-extern struct ir_scancode_table ir_codes_tt_1500_table;
-extern struct ir_scancode_table ir_codes_fusionhdtv_mce_table;
-extern struct ir_scancode_table ir_codes_behold_table;
-extern struct ir_scancode_table ir_codes_behold_columbus_table;
-extern struct ir_scancode_table ir_codes_pinnacle_pctv_hd_table;
-extern struct ir_scancode_table ir_codes_genius_tvgo_a11mce_table;
-extern struct ir_scancode_table ir_codes_powercolor_real_angel_table;
-extern struct ir_scancode_table ir_codes_avermedia_a16d_table;
-extern struct ir_scancode_table ir_codes_encore_enltv_fm53_table;
-extern struct ir_scancode_table ir_codes_real_audio_220_32_keys_table;
-extern struct ir_scancode_table ir_codes_msi_tvanywhere_plus_table;
-extern struct ir_scancode_table ir_codes_ati_tv_wonder_hd_600_table;
-extern struct ir_scancode_table ir_codes_kworld_plus_tv_analog_table;
-extern struct ir_scancode_table ir_codes_kaiomy_table;
-extern struct ir_scancode_table ir_codes_dm1105_nec_table;
-extern struct ir_scancode_table ir_codes_tevii_nec_table;
-extern struct ir_scancode_table ir_codes_tbs_nec_table;
-extern struct ir_scancode_table ir_codes_evga_indtube_table;
-extern struct ir_scancode_table ir_codes_terratec_cinergy_xs_table;
-extern struct ir_scancode_table ir_codes_videomate_s350_table;
-extern struct ir_scancode_table ir_codes_gadmei_rm008z_table;
-extern struct ir_scancode_table ir_codes_nec_terratec_cinergy_xs_table;
-extern struct ir_scancode_table ir_codes_winfast_usbii_deluxe_table;
-extern struct ir_scancode_table ir_codes_kworld_315u_table;
+#define IR_KEYTABLE(a)					\
+(ir_codes_ ## a ## _table)
+
+#define DECLARE_IR_KEYTABLE(a)					\
+extern struct ir_scancode_table IR_KEYTABLE(a)
+
+DECLARE_IR_KEYTABLE(empty);
+DECLARE_IR_KEYTABLE(avermedia);
+DECLARE_IR_KEYTABLE(avermedia_dvbt);
+DECLARE_IR_KEYTABLE(avermedia_m135a_rm_jx);
+DECLARE_IR_KEYTABLE(avermedia_cardbus);
+DECLARE_IR_KEYTABLE(apac_viewcomp);
+DECLARE_IR_KEYTABLE(pixelview);
+DECLARE_IR_KEYTABLE(pixelview_new);
+DECLARE_IR_KEYTABLE(nebula);
+DECLARE_IR_KEYTABLE(dntv_live_dvb_t);
+DECLARE_IR_KEYTABLE(iodata_bctv7e);
+DECLARE_IR_KEYTABLE(adstech_dvb_t_pci);
+DECLARE_IR_KEYTABLE(msi_tvanywhere);
+DECLARE_IR_KEYTABLE(cinergy_1400);
+DECLARE_IR_KEYTABLE(avertv_303);
+DECLARE_IR_KEYTABLE(dntv_live_dvbt_pro);
+DECLARE_IR_KEYTABLE(em_terratec);
+DECLARE_IR_KEYTABLE(pinnacle_grey);
+DECLARE_IR_KEYTABLE(flyvideo);
+DECLARE_IR_KEYTABLE(flydvb);
+DECLARE_IR_KEYTABLE(cinergy);
+DECLARE_IR_KEYTABLE(eztv);
+DECLARE_IR_KEYTABLE(avermedia);
+DECLARE_IR_KEYTABLE(videomate_tv_pvr);
+DECLARE_IR_KEYTABLE(manli);
+DECLARE_IR_KEYTABLE(gotview7135);
+DECLARE_IR_KEYTABLE(purpletv);
+DECLARE_IR_KEYTABLE(pctv_sedna);
+DECLARE_IR_KEYTABLE(pv951);
+DECLARE_IR_KEYTABLE(rc5_tv);
+DECLARE_IR_KEYTABLE(winfast);
+DECLARE_IR_KEYTABLE(pinnacle_color);
+DECLARE_IR_KEYTABLE(hauppauge_new);
+DECLARE_IR_KEYTABLE(rc5_hauppauge_new);
+DECLARE_IR_KEYTABLE(npgtech);
+DECLARE_IR_KEYTABLE(norwood);
+DECLARE_IR_KEYTABLE(proteus_2309);
+DECLARE_IR_KEYTABLE(budget_ci_old);
+DECLARE_IR_KEYTABLE(asus_pc39);
+DECLARE_IR_KEYTABLE(encore_enltv);
+DECLARE_IR_KEYTABLE(encore_enltv2);
+DECLARE_IR_KEYTABLE(tt_1500);
+DECLARE_IR_KEYTABLE(fusionhdtv_mce);
+DECLARE_IR_KEYTABLE(behold);
+DECLARE_IR_KEYTABLE(behold_columbus);
+DECLARE_IR_KEYTABLE(pinnacle_pctv_hd);
+DECLARE_IR_KEYTABLE(genius_tvgo_a11mce);
+DECLARE_IR_KEYTABLE(powercolor_real_angel);
+DECLARE_IR_KEYTABLE(avermedia_a16d);
+DECLARE_IR_KEYTABLE(encore_enltv_fm53);
+DECLARE_IR_KEYTABLE(real_audio_220_32_keys);
+DECLARE_IR_KEYTABLE(msi_tvanywhere_plus);
+DECLARE_IR_KEYTABLE(ati_tv_wonder_hd_600);
+DECLARE_IR_KEYTABLE(kworld_plus_tv_analog);
+DECLARE_IR_KEYTABLE(kaiomy);
+DECLARE_IR_KEYTABLE(dm1105_nec);
+DECLARE_IR_KEYTABLE(tevii_nec);
+DECLARE_IR_KEYTABLE(tbs_nec);
+DECLARE_IR_KEYTABLE(evga_indtube);
+DECLARE_IR_KEYTABLE(terratec_cinergy_xs);
+DECLARE_IR_KEYTABLE(videomate_s350);
+DECLARE_IR_KEYTABLE(gadmei_rm008z);
+DECLARE_IR_KEYTABLE(nec_terratec_cinergy_xs);
+DECLARE_IR_KEYTABLE(winfast_usbii_deluxe);
+DECLARE_IR_KEYTABLE(kworld_315u);
 #endif
-- 
cgit v1.2.3-18-g5258


From 165344bd43b1410d10dc9dc8a376da31178d1694 Mon Sep 17 00:00:00 2001
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Date: Thu, 1 Apr 2010 21:10:58 -0300
Subject: V4L/DVB: ir-common: re-order keytables by name and remove duplicates

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 include/media/ir-common.h | 96 +++++++++++++++++++++++------------------------
 1 file changed, 48 insertions(+), 48 deletions(-)

(limited to 'include/media')

diff --git a/include/media/ir-common.h b/include/media/ir-common.h
index 800fc980e0e..2e275154aef 100644
--- a/include/media/ir-common.h
+++ b/include/media/ir-common.h
@@ -112,69 +112,69 @@ void ir_rc5_timer_keyup(unsigned long data);
 #define DECLARE_IR_KEYTABLE(a)					\
 extern struct ir_scancode_table IR_KEYTABLE(a)
 
-DECLARE_IR_KEYTABLE(empty);
+DECLARE_IR_KEYTABLE(adstech_dvb_t_pci);
+DECLARE_IR_KEYTABLE(apac_viewcomp);
+DECLARE_IR_KEYTABLE(asus_pc39);
+DECLARE_IR_KEYTABLE(ati_tv_wonder_hd_600);
 DECLARE_IR_KEYTABLE(avermedia);
+DECLARE_IR_KEYTABLE(avermedia_a16d);
+DECLARE_IR_KEYTABLE(avermedia_cardbus);
 DECLARE_IR_KEYTABLE(avermedia_dvbt);
 DECLARE_IR_KEYTABLE(avermedia_m135a_rm_jx);
-DECLARE_IR_KEYTABLE(avermedia_cardbus);
-DECLARE_IR_KEYTABLE(apac_viewcomp);
-DECLARE_IR_KEYTABLE(pixelview);
-DECLARE_IR_KEYTABLE(pixelview_new);
-DECLARE_IR_KEYTABLE(nebula);
-DECLARE_IR_KEYTABLE(dntv_live_dvb_t);
-DECLARE_IR_KEYTABLE(iodata_bctv7e);
-DECLARE_IR_KEYTABLE(adstech_dvb_t_pci);
-DECLARE_IR_KEYTABLE(msi_tvanywhere);
-DECLARE_IR_KEYTABLE(cinergy_1400);
 DECLARE_IR_KEYTABLE(avertv_303);
+DECLARE_IR_KEYTABLE(behold);
+DECLARE_IR_KEYTABLE(behold_columbus);
+DECLARE_IR_KEYTABLE(budget_ci_old);
+DECLARE_IR_KEYTABLE(cinergy);
+DECLARE_IR_KEYTABLE(cinergy_1400);
+DECLARE_IR_KEYTABLE(dm1105_nec);
+DECLARE_IR_KEYTABLE(dntv_live_dvb_t);
 DECLARE_IR_KEYTABLE(dntv_live_dvbt_pro);
+DECLARE_IR_KEYTABLE(empty);
 DECLARE_IR_KEYTABLE(em_terratec);
-DECLARE_IR_KEYTABLE(pinnacle_grey);
-DECLARE_IR_KEYTABLE(flyvideo);
-DECLARE_IR_KEYTABLE(flydvb);
-DECLARE_IR_KEYTABLE(cinergy);
+DECLARE_IR_KEYTABLE(encore_enltv);
+DECLARE_IR_KEYTABLE(encore_enltv2);
+DECLARE_IR_KEYTABLE(encore_enltv_fm53);
+DECLARE_IR_KEYTABLE(evga_indtube);
 DECLARE_IR_KEYTABLE(eztv);
-DECLARE_IR_KEYTABLE(avermedia);
-DECLARE_IR_KEYTABLE(videomate_tv_pvr);
-DECLARE_IR_KEYTABLE(manli);
+DECLARE_IR_KEYTABLE(flydvb);
+DECLARE_IR_KEYTABLE(flyvideo);
+DECLARE_IR_KEYTABLE(fusionhdtv_mce);
+DECLARE_IR_KEYTABLE(gadmei_rm008z);
+DECLARE_IR_KEYTABLE(genius_tvgo_a11mce);
 DECLARE_IR_KEYTABLE(gotview7135);
-DECLARE_IR_KEYTABLE(purpletv);
-DECLARE_IR_KEYTABLE(pctv_sedna);
-DECLARE_IR_KEYTABLE(pv951);
-DECLARE_IR_KEYTABLE(rc5_tv);
-DECLARE_IR_KEYTABLE(winfast);
-DECLARE_IR_KEYTABLE(pinnacle_color);
 DECLARE_IR_KEYTABLE(hauppauge_new);
-DECLARE_IR_KEYTABLE(rc5_hauppauge_new);
-DECLARE_IR_KEYTABLE(npgtech);
+DECLARE_IR_KEYTABLE(iodata_bctv7e);
+DECLARE_IR_KEYTABLE(kaiomy);
+DECLARE_IR_KEYTABLE(kworld_315u);
+DECLARE_IR_KEYTABLE(kworld_plus_tv_analog);
+DECLARE_IR_KEYTABLE(manli);
+DECLARE_IR_KEYTABLE(msi_tvanywhere);
+DECLARE_IR_KEYTABLE(msi_tvanywhere_plus);
+DECLARE_IR_KEYTABLE(nebula);
+DECLARE_IR_KEYTABLE(nec_terratec_cinergy_xs);
 DECLARE_IR_KEYTABLE(norwood);
-DECLARE_IR_KEYTABLE(proteus_2309);
-DECLARE_IR_KEYTABLE(budget_ci_old);
-DECLARE_IR_KEYTABLE(asus_pc39);
-DECLARE_IR_KEYTABLE(encore_enltv);
-DECLARE_IR_KEYTABLE(encore_enltv2);
-DECLARE_IR_KEYTABLE(tt_1500);
-DECLARE_IR_KEYTABLE(fusionhdtv_mce);
-DECLARE_IR_KEYTABLE(behold);
-DECLARE_IR_KEYTABLE(behold_columbus);
+DECLARE_IR_KEYTABLE(npgtech);
+DECLARE_IR_KEYTABLE(pctv_sedna);
+DECLARE_IR_KEYTABLE(pinnacle_color);
+DECLARE_IR_KEYTABLE(pinnacle_grey);
 DECLARE_IR_KEYTABLE(pinnacle_pctv_hd);
-DECLARE_IR_KEYTABLE(genius_tvgo_a11mce);
+DECLARE_IR_KEYTABLE(pixelview);
+DECLARE_IR_KEYTABLE(pixelview_new);
 DECLARE_IR_KEYTABLE(powercolor_real_angel);
-DECLARE_IR_KEYTABLE(avermedia_a16d);
-DECLARE_IR_KEYTABLE(encore_enltv_fm53);
+DECLARE_IR_KEYTABLE(proteus_2309);
+DECLARE_IR_KEYTABLE(purpletv);
+DECLARE_IR_KEYTABLE(pv951);
+DECLARE_IR_KEYTABLE(rc5_hauppauge_new);
+DECLARE_IR_KEYTABLE(rc5_tv);
 DECLARE_IR_KEYTABLE(real_audio_220_32_keys);
-DECLARE_IR_KEYTABLE(msi_tvanywhere_plus);
-DECLARE_IR_KEYTABLE(ati_tv_wonder_hd_600);
-DECLARE_IR_KEYTABLE(kworld_plus_tv_analog);
-DECLARE_IR_KEYTABLE(kaiomy);
-DECLARE_IR_KEYTABLE(dm1105_nec);
-DECLARE_IR_KEYTABLE(tevii_nec);
 DECLARE_IR_KEYTABLE(tbs_nec);
-DECLARE_IR_KEYTABLE(evga_indtube);
 DECLARE_IR_KEYTABLE(terratec_cinergy_xs);
+DECLARE_IR_KEYTABLE(tevii_nec);
+DECLARE_IR_KEYTABLE(tt_1500);
 DECLARE_IR_KEYTABLE(videomate_s350);
-DECLARE_IR_KEYTABLE(gadmei_rm008z);
-DECLARE_IR_KEYTABLE(nec_terratec_cinergy_xs);
+DECLARE_IR_KEYTABLE(videomate_tv_pvr);
+DECLARE_IR_KEYTABLE(winfast);
 DECLARE_IR_KEYTABLE(winfast_usbii_deluxe);
-DECLARE_IR_KEYTABLE(kworld_315u);
+
 #endif
-- 
cgit v1.2.3-18-g5258


From dce4a3e3b228fd31bcfd2d84e673bc08b553e6cc Mon Sep 17 00:00:00 2001
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Date: Thu, 1 Apr 2010 22:23:38 -0300
Subject: V4L/DVB: ir-common: Use macros to define the keytables

The usage of macros ensures that the proper namespace is being used
by all tables. It also makes easier to associate a keytable with
the name used inside the drivers.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 include/media/ir-common.h | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

(limited to 'include/media')

diff --git a/include/media/ir-common.h b/include/media/ir-common.h
index 2e275154aef..e8a64761df5 100644
--- a/include/media/ir-common.h
+++ b/include/media/ir-common.h
@@ -107,11 +107,23 @@ void ir_rc5_timer_keyup(unsigned long data);
 /* scancode->keycode map tables from ir-keymaps.c */
 
 #define IR_KEYTABLE(a)					\
-(ir_codes_ ## a ## _table)
+ir_codes_ ## a ## _table
 
 #define DECLARE_IR_KEYTABLE(a)					\
 extern struct ir_scancode_table IR_KEYTABLE(a)
 
+#define DEFINE_IR_KEYTABLE(tabname, type)			\
+struct ir_scancode_table IR_KEYTABLE(tabname) = {		\
+	.scan = tabname,					\
+	.size = ARRAY_SIZE(tabname),				\
+	.ir_type = type,					\
+	.name = #tabname,					\
+};								\
+EXPORT_SYMBOL_GPL(IR_KEYTABLE(tabname))
+
+#define DEFINE_LEGACY_IR_KEYTABLE(tabname)			\
+	DEFINE_IR_KEYTABLE(tabname, IR_TYPE_UNKNOWN)
+
 DECLARE_IR_KEYTABLE(adstech_dvb_t_pci);
 DECLARE_IR_KEYTABLE(apac_viewcomp);
 DECLARE_IR_KEYTABLE(asus_pc39);
-- 
cgit v1.2.3-18-g5258


From 77b7422d48cda9b8e5dabb7f4bc056861c5ed4fe Mon Sep 17 00:00:00 2001
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Date: Thu, 1 Apr 2010 22:43:29 -0300
Subject: V4L/DVB: ir-common: move IR tables from ir-keymaps.c to a separate
 file

Instead of having one big file with lots of keytables, create one include
file for each IR keymap.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 include/media/ir-common.h                        | 150 ++++++++++-------------
 include/media/ir-core.h                          |  18 +++
 include/media/keycodes/adstech-dvb-t-pci.h       |  65 ++++++++++
 include/media/keycodes/apac-viewcomp.h           |  56 +++++++++
 include/media/keycodes/asus-pc39.h               |  67 ++++++++++
 include/media/keycodes/ati-tv-wonder-hd-600.h    |  45 +++++++
 include/media/keycodes/avermedia-a16d.h          |  52 ++++++++
 include/media/keycodes/avermedia-cardbus.h       |  73 +++++++++++
 include/media/keycodes/avermedia-dvbt.h          |  54 ++++++++
 include/media/keycodes/avermedia-m135a-rm-jx.h   |  66 ++++++++++
 include/media/keycodes/avermedia.h               |  62 ++++++++++
 include/media/keycodes/avertv-303.h              |  61 +++++++++
 include/media/keycodes/behold-columbus.h         |  84 +++++++++++++
 include/media/keycodes/behold.h                  | 117 ++++++++++++++++++
 include/media/keycodes/budget-ci-old.h           |  68 ++++++++++
 include/media/keycodes/cinergy-1400.h            |  60 +++++++++
 include/media/keycodes/cinergy.h                 |  55 +++++++++
 include/media/keycodes/dm1105-nec.h              |  52 ++++++++
 include/media/keycodes/dntv-live-dvb-t.h         |  54 ++++++++
 include/media/keycodes/dntv-live-dvbt-pro.h      |  73 +++++++++++
 include/media/keycodes/em-terratec.h             |  46 +++++++
 include/media/keycodes/empty.h                   |  20 +++
 include/media/keycodes/encore-enltv-fm53.h       |  57 +++++++++
 include/media/keycodes/encore-enltv.h            |  88 +++++++++++++
 include/media/keycodes/encore-enltv2.h           |  66 ++++++++++
 include/media/keycodes/evga-indtube.h            |  37 ++++++
 include/media/keycodes/eztv.h                    |  72 +++++++++++
 include/media/keycodes/flydvb.h                  |  54 ++++++++
 include/media/keycodes/flyvideo.h                |  47 +++++++
 include/media/keycodes/fusionhdtv-mce.h          |  74 +++++++++++
 include/media/keycodes/gadmei-rm008z.h           |  57 +++++++++
 include/media/keycodes/genius-tvgo-a11mce.h      |  60 +++++++++
 include/media/keycodes/gotview7135.h             |  55 +++++++++
 include/media/keycodes/hauppauge-new.h           |  76 ++++++++++++
 include/media/keycodes/iodata-bctv7e.h           |  64 ++++++++++
 include/media/keycodes/kaiomy.h                  |  63 ++++++++++
 include/media/keycodes/kworld-315u.h             |  59 +++++++++
 include/media/keycodes/kworld-plus-tv-analog.h   |  75 ++++++++++++
 include/media/keycodes/manli.h                   | 111 +++++++++++++++++
 include/media/keycodes/msi-tvanywhere-plus.h     | 100 +++++++++++++++
 include/media/keycodes/msi-tvanywhere.h          |  44 +++++++
 include/media/keycodes/nebula.h                  |  73 +++++++++++
 include/media/keycodes/nec-terratec-cinergy-xs.h |  81 ++++++++++++
 include/media/keycodes/norwood.h                 |  61 +++++++++
 include/media/keycodes/npgtech.h                 |  57 +++++++++
 include/media/keycodes/pctv-sedna.h              |  56 +++++++++
 include/media/keycodes/pinnacle-color.h          |  71 +++++++++++
 include/media/keycodes/pinnacle-grey.h           |  66 ++++++++++
 include/media/keycodes/pinnacle-pctv-hd.h        |  49 ++++++++
 include/media/keycodes/pixelview-new.h           |  59 +++++++++
 include/media/keycodes/pixelview.h               |  59 +++++++++
 include/media/keycodes/powercolor-real-angel.h   |  57 +++++++++
 include/media/keycodes/proteus-2309.h            |  45 +++++++
 include/media/keycodes/purpletv.h                |  58 +++++++++
 include/media/keycodes/pv951.h                   |  54 ++++++++
 include/media/keycodes/rc5-hauppauge-new.h       |  79 ++++++++++++
 include/media/keycodes/rc5-tv.h                  |  57 +++++++++
 include/media/keycodes/real-audio-220-32-keys.h  |  54 ++++++++
 include/media/keycodes/tbs-nec.h                 |  50 ++++++++
 include/media/keycodes/terratec-cinergy-xs.h     |  68 ++++++++++
 include/media/keycodes/tevii-nec.h               |  65 ++++++++++
 include/media/keycodes/tt-1500.h                 |  58 +++++++++
 include/media/keycodes/videomate-s350.h          |  62 ++++++++++
 include/media/keycodes/videomate-tv-pvr.h        |  64 ++++++++++
 include/media/keycodes/winfast-usbii-deluxe.h    |  58 +++++++++
 include/media/keycodes/winfast.h                 |  78 ++++++++++++
 66 files changed, 4111 insertions(+), 85 deletions(-)
 create mode 100644 include/media/keycodes/adstech-dvb-t-pci.h
 create mode 100644 include/media/keycodes/apac-viewcomp.h
 create mode 100644 include/media/keycodes/asus-pc39.h
 create mode 100644 include/media/keycodes/ati-tv-wonder-hd-600.h
 create mode 100644 include/media/keycodes/avermedia-a16d.h
 create mode 100644 include/media/keycodes/avermedia-cardbus.h
 create mode 100644 include/media/keycodes/avermedia-dvbt.h
 create mode 100644 include/media/keycodes/avermedia-m135a-rm-jx.h
 create mode 100644 include/media/keycodes/avermedia.h
 create mode 100644 include/media/keycodes/avertv-303.h
 create mode 100644 include/media/keycodes/behold-columbus.h
 create mode 100644 include/media/keycodes/behold.h
 create mode 100644 include/media/keycodes/budget-ci-old.h
 create mode 100644 include/media/keycodes/cinergy-1400.h
 create mode 100644 include/media/keycodes/cinergy.h
 create mode 100644 include/media/keycodes/dm1105-nec.h
 create mode 100644 include/media/keycodes/dntv-live-dvb-t.h
 create mode 100644 include/media/keycodes/dntv-live-dvbt-pro.h
 create mode 100644 include/media/keycodes/em-terratec.h
 create mode 100644 include/media/keycodes/empty.h
 create mode 100644 include/media/keycodes/encore-enltv-fm53.h
 create mode 100644 include/media/keycodes/encore-enltv.h
 create mode 100644 include/media/keycodes/encore-enltv2.h
 create mode 100644 include/media/keycodes/evga-indtube.h
 create mode 100644 include/media/keycodes/eztv.h
 create mode 100644 include/media/keycodes/flydvb.h
 create mode 100644 include/media/keycodes/flyvideo.h
 create mode 100644 include/media/keycodes/fusionhdtv-mce.h
 create mode 100644 include/media/keycodes/gadmei-rm008z.h
 create mode 100644 include/media/keycodes/genius-tvgo-a11mce.h
 create mode 100644 include/media/keycodes/gotview7135.h
 create mode 100644 include/media/keycodes/hauppauge-new.h
 create mode 100644 include/media/keycodes/iodata-bctv7e.h
 create mode 100644 include/media/keycodes/kaiomy.h
 create mode 100644 include/media/keycodes/kworld-315u.h
 create mode 100644 include/media/keycodes/kworld-plus-tv-analog.h
 create mode 100644 include/media/keycodes/manli.h
 create mode 100644 include/media/keycodes/msi-tvanywhere-plus.h
 create mode 100644 include/media/keycodes/msi-tvanywhere.h
 create mode 100644 include/media/keycodes/nebula.h
 create mode 100644 include/media/keycodes/nec-terratec-cinergy-xs.h
 create mode 100644 include/media/keycodes/norwood.h
 create mode 100644 include/media/keycodes/npgtech.h
 create mode 100644 include/media/keycodes/pctv-sedna.h
 create mode 100644 include/media/keycodes/pinnacle-color.h
 create mode 100644 include/media/keycodes/pinnacle-grey.h
 create mode 100644 include/media/keycodes/pinnacle-pctv-hd.h
 create mode 100644 include/media/keycodes/pixelview-new.h
 create mode 100644 include/media/keycodes/pixelview.h
 create mode 100644 include/media/keycodes/powercolor-real-angel.h
 create mode 100644 include/media/keycodes/proteus-2309.h
 create mode 100644 include/media/keycodes/purpletv.h
 create mode 100644 include/media/keycodes/pv951.h
 create mode 100644 include/media/keycodes/rc5-hauppauge-new.h
 create mode 100644 include/media/keycodes/rc5-tv.h
 create mode 100644 include/media/keycodes/real-audio-220-32-keys.h
 create mode 100644 include/media/keycodes/tbs-nec.h
 create mode 100644 include/media/keycodes/terratec-cinergy-xs.h
 create mode 100644 include/media/keycodes/tevii-nec.h
 create mode 100644 include/media/keycodes/tt-1500.h
 create mode 100644 include/media/keycodes/videomate-s350.h
 create mode 100644 include/media/keycodes/videomate-tv-pvr.h
 create mode 100644 include/media/keycodes/winfast-usbii-deluxe.h
 create mode 100644 include/media/keycodes/winfast.h

(limited to 'include/media')

diff --git a/include/media/ir-common.h b/include/media/ir-common.h
index e8a64761df5..59ce30280b7 100644
--- a/include/media/ir-common.h
+++ b/include/media/ir-common.h
@@ -28,6 +28,71 @@
 #include <linux/interrupt.h>
 #include <media/ir-core.h>
 
+#include <media/keycodes/adstech-dvb-t-pci.h>
+#include <media/keycodes/apac-viewcomp.h>
+#include <media/keycodes/asus-pc39.h>
+#include <media/keycodes/ati-tv-wonder-hd-600.h>
+#include <media/keycodes/avermedia-a16d.h>
+#include <media/keycodes/avermedia-cardbus.h>
+#include <media/keycodes/avermedia-dvbt.h>
+#include <media/keycodes/avermedia.h>
+#include <media/keycodes/avermedia-m135a-rm-jx.h>
+#include <media/keycodes/avertv-303.h>
+#include <media/keycodes/behold-columbus.h>
+#include <media/keycodes/behold.h>
+#include <media/keycodes/budget-ci-old.h>
+#include <media/keycodes/cinergy-1400.h>
+#include <media/keycodes/cinergy.h>
+#include <media/keycodes/dm1105-nec.h>
+#include <media/keycodes/dntv-live-dvb-t.h>
+#include <media/keycodes/dntv-live-dvbt-pro.h>
+#include <media/keycodes/empty.h>
+#include <media/keycodes/em-terratec.h>
+#include <media/keycodes/encore-enltv2.h>
+#include <media/keycodes/encore-enltv-fm53.h>
+#include <media/keycodes/encore-enltv.h>
+#include <media/keycodes/evga-indtube.h>
+#include <media/keycodes/eztv.h>
+#include <media/keycodes/flydvb.h>
+#include <media/keycodes/flyvideo.h>
+#include <media/keycodes/fusionhdtv-mce.h>
+#include <media/keycodes/gadmei-rm008z.h>
+#include <media/keycodes/genius-tvgo-a11mce.h>
+#include <media/keycodes/gotview7135.h>
+#include <media/keycodes/hauppauge-new.h>
+#include <media/keycodes/iodata-bctv7e.h>
+#include <media/keycodes/kaiomy.h>
+#include <media/keycodes/kworld-315u.h>
+#include <media/keycodes/kworld-plus-tv-analog.h>
+#include <media/keycodes/manli.h>
+#include <media/keycodes/msi-tvanywhere.h>
+#include <media/keycodes/msi-tvanywhere-plus.h>
+#include <media/keycodes/nebula.h>
+#include <media/keycodes/nec-terratec-cinergy-xs.h>
+#include <media/keycodes/norwood.h>
+#include <media/keycodes/npgtech.h>
+#include <media/keycodes/pctv-sedna.h>
+#include <media/keycodes/pinnacle-color.h>
+#include <media/keycodes/pinnacle-grey.h>
+#include <media/keycodes/pinnacle-pctv-hd.h>
+#include <media/keycodes/pixelview.h>
+#include <media/keycodes/pixelview-new.h>
+#include <media/keycodes/powercolor-real-angel.h>
+#include <media/keycodes/proteus-2309.h>
+#include <media/keycodes/purpletv.h>
+#include <media/keycodes/pv951.h>
+#include <media/keycodes/rc5-hauppauge-new.h>
+#include <media/keycodes/rc5-tv.h>
+#include <media/keycodes/real-audio-220-32-keys.h>
+#include <media/keycodes/tbs-nec.h>
+#include <media/keycodes/terratec-cinergy-xs.h>
+#include <media/keycodes/tevii-nec.h>
+#include <media/keycodes/tt-1500.h>
+#include <media/keycodes/videomate-s350.h>
+#include <media/keycodes/videomate-tv-pvr.h>
+#include <media/keycodes/winfast.h>
+#include <media/keycodes/winfast-usbii-deluxe.h>
+
 #define RC5_START(x)	(((x)>>12)&3)
 #define RC5_TOGGLE(x)	(((x)>>11)&1)
 #define RC5_ADDR(x)	(((x)>>6)&31)
@@ -104,89 +169,4 @@ u32  ir_rc5_decode(unsigned int code);
 void ir_rc5_timer_end(unsigned long data);
 void ir_rc5_timer_keyup(unsigned long data);
 
-/* scancode->keycode map tables from ir-keymaps.c */
-
-#define IR_KEYTABLE(a)