aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx231xx/cx231xx-input.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-12-17 18:28:23 -0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-12-17 18:28:23 -0200
commit668a01a1040db25bed90c5e3bea18988ecc762c9 (patch)
treecc8b831c8487ee62aa6bfbc26b50648ad7a3652a /drivers/media/video/cx231xx/cx231xx-input.c
parent3c91560bf96a1f7ad39131e7730fd319647ff734 (diff)
parent31e5503c0a5f4f61ab14b26b7b8e3c359b3b7cbf (diff)
Merge /home/v4l/v4l/patchworkHEADmaster
* /home/v4l/v4l/patchwork: [media] cx231xx: Fix IR keymap for Pixelview SBTVD Hybrid [media] Add a keymap for Pixelview 002-T remote [media] cx231xx: Fix inverted bits for RC on PV Hybrid
Diffstat (limited to 'drivers/media/video/cx231xx/cx231xx-input.c')
-rw-r--r--drivers/media/video/cx231xx/cx231xx-input.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/drivers/media/video/cx231xx/cx231xx-input.c b/drivers/media/video/cx231xx/cx231xx-input.c
index c236a4e7e97b..45e14cac4622 100644
--- a/drivers/media/video/cx231xx/cx231xx-input.c
+++ b/drivers/media/video/cx231xx/cx231xx-input.c
@@ -27,7 +27,7 @@
static int get_key_isdbt(struct IR_i2c *ir, u32 *ir_key,
u32 *ir_raw)
{
- u8 cmd;
+ u8 cmd, scancode;
dev_dbg(&ir->rc->input_dev->dev, "%s\n", __func__);
@@ -42,10 +42,21 @@ static int get_key_isdbt(struct IR_i2c *ir, u32 *ir_key,
if (cmd == 0xff)
return 0;
- dev_dbg(&ir->rc->input_dev->dev, "scancode = %02x\n", cmd);
-
- *ir_key = cmd;
- *ir_raw = cmd;
+ scancode =
+ ((cmd & 0x01) ? 0x80 : 0) |
+ ((cmd & 0x02) ? 0x40 : 0) |
+ ((cmd & 0x04) ? 0x20 : 0) |
+ ((cmd & 0x08) ? 0x10 : 0) |
+ ((cmd & 0x10) ? 0x08 : 0) |
+ ((cmd & 0x20) ? 0x04 : 0) |
+ ((cmd & 0x40) ? 0x02 : 0) |
+ ((cmd & 0x80) ? 0x01 : 0);
+
+ dev_dbg(&ir->rc->input_dev->dev, "cmd %02x, scan = %02x\n",
+ cmd, scancode);
+
+ *ir_key = scancode;
+ *ir_raw = scancode;
return 1;
}

Privacy Policy