~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/media/video/ir-kbd-i2c.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
static int debug;
56
56
module_param(debug, int, 0644);    /* debug level (0,1,2) */
57
57
 
58
 
static int hauppauge;
59
 
module_param(hauppauge, int, 0644);    /* Choose Hauppauge remote */
60
 
MODULE_PARM_DESC(hauppauge, "Specify Hauppauge remote: 0=black, 1=grey (defaults to 0)");
61
 
 
62
58
 
63
59
#define MODULE_NAME "ir-kbd-i2c"
64
60
#define dprintk(level, fmt, arg...)     if (debug >= level) \
105
101
                /* invalid key press */
106
102
                return 0;
107
103
 
108
 
        if (dev!=0x1e && dev!=0x1f)
109
 
                /* not a hauppauge remote */
110
 
                return 0;
111
 
 
112
104
        if (!range)
113
105
                code += 64;
114
106
 
116
108
                start, range, toggle, dev, code);
117
109
 
118
110
        /* return key */
119
 
        *ir_key = code;
 
111
        *ir_key = (dev << 8) | code;
120
112
        *ir_raw = ircode;
121
113
        return 1;
122
114
}
312
304
                name        = "Hauppauge";
313
305
                ir->get_key = get_key_haup;
314
306
                rc_type     = RC_TYPE_RC5;
315
 
                if (hauppauge == 1) {
316
 
                        ir_codes    = RC_MAP_HAUPPAUGE_NEW;
317
 
                } else {
318
 
                        ir_codes    = RC_MAP_RC5_TV;
319
 
                }
 
307
                ir_codes    = RC_MAP_HAUPPAUGE;
320
308
                break;
321
309
        case 0x30:
322
310
                name        = "KNC One";
340
328
                name        = "Hauppauge/Zilog Z8";
341
329
                ir->get_key = get_key_haup_xvr;
342
330
                rc_type     = RC_TYPE_RC5;
343
 
                ir_codes    = hauppauge ? RC_MAP_HAUPPAUGE_NEW : RC_MAP_RC5_TV;
 
331
                ir_codes    = RC_MAP_HAUPPAUGE;
344
332
                break;
345
333
        }
346
334