aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ir-kbd-i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/ir-kbd-i2c.c')
-rw-r--r--drivers/media/video/ir-kbd-i2c.c50
1 files changed, 10 insertions, 40 deletions
diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c
index 58b0e6982822..95bacf435414 100644
--- a/drivers/media/video/ir-kbd-i2c.c
+++ b/drivers/media/video/ir-kbd-i2c.c
@@ -44,51 +44,17 @@
44#include <media/ir-common.h> 44#include <media/ir-common.h>
45#include <media/ir-kbd-i2c.h> 45#include <media/ir-kbd-i2c.h>
46 46
47/* Mark Phalan <phalanm@o2.ie> */
48static IR_KEYTAB_TYPE ir_codes_pv951[IR_KEYTAB_SIZE] = {
49 [ 0 ] = KEY_KP0,
50 [ 1 ] = KEY_KP1,
51 [ 2 ] = KEY_KP2,
52 [ 3 ] = KEY_KP3,
53 [ 4 ] = KEY_KP4,
54 [ 5 ] = KEY_KP5,
55 [ 6 ] = KEY_KP6,
56 [ 7 ] = KEY_KP7,
57 [ 8 ] = KEY_KP8,
58 [ 9 ] = KEY_KP9,
59
60 [ 18 ] = KEY_POWER,
61 [ 16 ] = KEY_MUTE,
62 [ 31 ] = KEY_VOLUMEDOWN,
63 [ 27 ] = KEY_VOLUMEUP,
64 [ 26 ] = KEY_CHANNELUP,
65 [ 30 ] = KEY_CHANNELDOWN,
66 [ 14 ] = KEY_PAGEUP,
67 [ 29 ] = KEY_PAGEDOWN,
68 [ 19 ] = KEY_SOUND,
69
70 [ 24 ] = KEY_KPPLUSMINUS, /* CH +/- */
71 [ 22 ] = KEY_SUBTITLE, /* CC */
72 [ 13 ] = KEY_TEXT, /* TTX */
73 [ 11 ] = KEY_TV, /* AIR/CBL */
74 [ 17 ] = KEY_PC, /* PC/TV */
75 [ 23 ] = KEY_OK, /* CH RTN */
76 [ 25 ] = KEY_MODE, /* FUNC */
77 [ 12 ] = KEY_SEARCH, /* AUTOSCAN */
78
79 /* Not sure what to do with these ones! */
80 [ 15 ] = KEY_SELECT, /* SOURCE */
81 [ 10 ] = KEY_KPPLUS, /* +100 */
82 [ 20 ] = KEY_KPEQUAL, /* SYNC */
83 [ 28 ] = KEY_MEDIA, /* PC/TV */
84};
85
86/* ----------------------------------------------------------------------- */ 47/* ----------------------------------------------------------------------- */
87/* insmod parameters */ 48/* insmod parameters */
88 49
89static int debug; 50static int debug;
90module_param(debug, int, 0644); /* debug level (0,1,2) */ 51module_param(debug, int, 0644); /* debug level (0,1,2) */
91 52
53static int hauppauge = 0;
54module_param(hauppauge, int, 0644); /* Choose Hauppauge remote */
55MODULE_PARM_DESC(hauppauge, "Specify Hauppauge remote: 0=black, 1=grey (defaults to 0)");
56
57
92#define DEVNAME "ir-kbd-i2c" 58#define DEVNAME "ir-kbd-i2c"
93#define dprintk(level, fmt, arg...) if (debug >= level) \ 59#define dprintk(level, fmt, arg...) if (debug >= level) \
94 printk(KERN_DEBUG DEVNAME ": " fmt , ## arg) 60 printk(KERN_DEBUG DEVNAME ": " fmt , ## arg)
@@ -336,7 +302,11 @@ static int ir_attach(struct i2c_adapter *adap, int addr,
336 name = "Hauppauge"; 302 name = "Hauppauge";
337 ir->get_key = get_key_haup; 303 ir->get_key = get_key_haup;
338 ir_type = IR_TYPE_RC5; 304 ir_type = IR_TYPE_RC5;
339 ir_codes = ir_codes_rc5_tv; 305 if (hauppauge == 1) {
306 ir_codes = ir_codes_hauppauge_new;
307 } else {
308 ir_codes = ir_codes_rc5_tv;
309 }
340 break; 310 break;
341 case 0x30: 311 case 0x30:
342 name = "KNC One"; 312 name = "KNC One";