Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 226307
b: refs/heads/master
c: e330289
h: refs/heads/master
i:
  226305: 2bb06e1
  226303: ef7f6b3
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Dec 29, 2010
1 parent 8baeb90 commit 857e468
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 49aefd2bcda80d33497f0f26702c67e372cacef3
refs/heads/master: e330289ed40f76819d6a13e682203c6fc9a86304
21 changes: 16 additions & 5 deletions trunk/drivers/media/video/cx231xx/cx231xx-input.c
Original file line number Diff line number Diff line change
Expand Up @@ -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__);

Expand All @@ -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;
}

Expand Down

0 comments on commit 857e468

Please sign in to comment.