diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-04-02 19:01:00 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-19 11:56:50 -0400 |
commit | 02858eedcb78a664215b918d98cdb753ce432ce6 (patch) | |
tree | dd212b7b2e63cd846a1c9cf0d9b751514648b130 /drivers/media/video/cx88 | |
parent | b2245ba1644eb1eba400fd04c6e7bb3ab2d4a8fa (diff) |
V4L/DVB: ir-core: Make use of the new IR keymap modules
Instead of using the ugly keymap sequences, use the new rc-*.ko keymap
files. For now, it is still needed to have one keymap loaded, for the
RC code to work. Later patches will remove this depenency.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx88')
-rw-r--r-- | drivers/media/video/cx88/cx88-input.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/drivers/media/video/cx88/cx88-input.c b/drivers/media/video/cx88/cx88-input.c index 30af956a9eaa..6efad1da65bf 100644 --- a/drivers/media/video/cx88/cx88-input.c +++ b/drivers/media/video/cx88/cx88-input.c | |||
@@ -245,7 +245,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) | |||
245 | { | 245 | { |
246 | struct cx88_IR *ir; | 246 | struct cx88_IR *ir; |
247 | struct input_dev *input_dev; | 247 | struct input_dev *input_dev; |
248 | struct ir_scancode_table *ir_codes = NULL; | 248 | char *ir_codes = NULL; |
249 | u64 ir_type = IR_TYPE_OTHER; | 249 | u64 ir_type = IR_TYPE_OTHER; |
250 | int err = -ENOMEM; | 250 | int err = -ENOMEM; |
251 | 251 | ||
@@ -261,14 +261,14 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) | |||
261 | case CX88_BOARD_DNTV_LIVE_DVB_T: | 261 | case CX88_BOARD_DNTV_LIVE_DVB_T: |
262 | case CX88_BOARD_KWORLD_DVB_T: | 262 | case CX88_BOARD_KWORLD_DVB_T: |
263 | case CX88_BOARD_KWORLD_DVB_T_CX22702: | 263 | case CX88_BOARD_KWORLD_DVB_T_CX22702: |
264 | ir_codes = &IR_KEYTABLE(dntv_live_dvb_t); | 264 | ir_codes = RC_MAP_DNTV_LIVE_DVB_T; |
265 | ir->gpio_addr = MO_GP1_IO; | 265 | ir->gpio_addr = MO_GP1_IO; |
266 | ir->mask_keycode = 0x1f; | 266 | ir->mask_keycode = 0x1f; |
267 | ir->mask_keyup = 0x60; | 267 | ir->mask_keyup = 0x60; |
268 | ir->polling = 50; /* ms */ | 268 | ir->polling = 50; /* ms */ |
269 | break; | 269 | break; |
270 | case CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1: | 270 | case CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1: |
271 | ir_codes = &IR_KEYTABLE(cinergy_1400); | 271 | ir_codes = RC_MAP_CINERGY_1400; |
272 | ir_type = IR_TYPE_PD; | 272 | ir_type = IR_TYPE_PD; |
273 | ir->sampling = 0xeb04; /* address */ | 273 | ir->sampling = 0xeb04; /* address */ |
274 | break; | 274 | break; |
@@ -283,14 +283,14 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) | |||
283 | case CX88_BOARD_PCHDTV_HD3000: | 283 | case CX88_BOARD_PCHDTV_HD3000: |
284 | case CX88_BOARD_PCHDTV_HD5500: | 284 | case CX88_BOARD_PCHDTV_HD5500: |
285 | case CX88_BOARD_HAUPPAUGE_IRONLY: | 285 | case CX88_BOARD_HAUPPAUGE_IRONLY: |
286 | ir_codes = &IR_KEYTABLE(hauppauge_new); | 286 | ir_codes = RC_MAP_HAUPPAUGE_NEW; |
287 | ir_type = IR_TYPE_RC5; | 287 | ir_type = IR_TYPE_RC5; |
288 | ir->sampling = 1; | 288 | ir->sampling = 1; |
289 | break; | 289 | break; |
290 | case CX88_BOARD_WINFAST_DTV2000H: | 290 | case CX88_BOARD_WINFAST_DTV2000H: |
291 | case CX88_BOARD_WINFAST_DTV2000H_J: | 291 | case CX88_BOARD_WINFAST_DTV2000H_J: |
292 | case CX88_BOARD_WINFAST_DTV1800H: | 292 | case CX88_BOARD_WINFAST_DTV1800H: |
293 | ir_codes = &IR_KEYTABLE(winfast); | 293 | ir_codes = RC_MAP_WINFAST; |
294 | ir->gpio_addr = MO_GP0_IO; | 294 | ir->gpio_addr = MO_GP0_IO; |
295 | ir->mask_keycode = 0x8f8; | 295 | ir->mask_keycode = 0x8f8; |
296 | ir->mask_keyup = 0x100; | 296 | ir->mask_keyup = 0x100; |
@@ -299,14 +299,14 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) | |||
299 | case CX88_BOARD_WINFAST2000XP_EXPERT: | 299 | case CX88_BOARD_WINFAST2000XP_EXPERT: |
300 | case CX88_BOARD_WINFAST_DTV1000: | 300 | case CX88_BOARD_WINFAST_DTV1000: |
301 | case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL: | 301 | case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL: |
302 | ir_codes = &IR_KEYTABLE(winfast); | 302 | ir_codes = RC_MAP_WINFAST; |
303 | ir->gpio_addr = MO_GP0_IO; | 303 | ir->gpio_addr = MO_GP0_IO; |
304 | ir->mask_keycode = 0x8f8; | 304 | ir->mask_keycode = 0x8f8; |
305 | ir->mask_keyup = 0x100; | 305 | ir->mask_keyup = 0x100; |
306 | ir->polling = 1; /* ms */ | 306 | ir->polling = 1; /* ms */ |
307 | break; | 307 | break; |
308 | case CX88_BOARD_IODATA_GVBCTV7E: | 308 | case CX88_BOARD_IODATA_GVBCTV7E: |
309 | ir_codes = &IR_KEYTABLE(iodata_bctv7e); | 309 | ir_codes = RC_MAP_IODATA_BCTV7E; |
310 | ir->gpio_addr = MO_GP0_IO; | 310 | ir->gpio_addr = MO_GP0_IO; |
311 | ir->mask_keycode = 0xfd; | 311 | ir->mask_keycode = 0xfd; |
312 | ir->mask_keydown = 0x02; | 312 | ir->mask_keydown = 0x02; |
@@ -314,7 +314,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) | |||
314 | break; | 314 | break; |
315 | case CX88_BOARD_PROLINK_PLAYTVPVR: | 315 | case CX88_BOARD_PROLINK_PLAYTVPVR: |
316 | case CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO: | 316 | case CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO: |
317 | ir_codes = &IR_KEYTABLE(pixelview); | 317 | ir_codes = RC_MAP_PIXELVIEW; |
318 | ir->gpio_addr = MO_GP1_IO; | 318 | ir->gpio_addr = MO_GP1_IO; |
319 | ir->mask_keycode = 0x1f; | 319 | ir->mask_keycode = 0x1f; |
320 | ir->mask_keyup = 0x80; | 320 | ir->mask_keyup = 0x80; |
@@ -322,28 +322,28 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) | |||
322 | break; | 322 | break; |
323 | case CX88_BOARD_PROLINK_PV_8000GT: | 323 | case CX88_BOARD_PROLINK_PV_8000GT: |
324 | case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME: | 324 | case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME: |
325 | ir_codes = &IR_KEYTABLE(pixelview_new); | 325 | ir_codes = RC_MAP_PIXELVIEW_NEW; |
326 | ir->gpio_addr = MO_GP1_IO; | 326 | ir->gpio_addr = MO_GP1_IO; |
327 | ir->mask_keycode = 0x3f; | 327 | ir->mask_keycode = 0x3f; |
328 | ir->mask_keyup = 0x80; | 328 | ir->mask_keyup = 0x80; |
329 | ir->polling = 1; /* ms */ | 329 | ir->polling = 1; /* ms */ |
330 | break; | 330 | break; |
331 | case CX88_BOARD_KWORLD_LTV883: | 331 | case CX88_BOARD_KWORLD_LTV883: |
332 | ir_codes = &IR_KEYTABLE(pixelview); | 332 | ir_codes = RC_MAP_PIXELVIEW; |
333 | ir->gpio_addr = MO_GP1_IO; | 333 | ir->gpio_addr = MO_GP1_IO; |
334 | ir->mask_keycode = 0x1f; | 334 | ir->mask_keycode = 0x1f; |
335 | ir->mask_keyup = 0x60; | 335 | ir->mask_keyup = 0x60; |
336 | ir->polling = 1; /* ms */ | 336 | ir->polling = 1; /* ms */ |
337 | break; | 337 | break; |
338 | case CX88_BOARD_ADSTECH_DVB_T_PCI: | 338 | case CX88_BOARD_ADSTECH_DVB_T_PCI: |
339 | ir_codes = &IR_KEYTABLE(adstech_dvb_t_pci); | 339 | ir_codes = RC_MAP_ADSTECH_DVB_T_PCI; |
340 | ir->gpio_addr = MO_GP1_IO; | 340 | ir->gpio_addr = MO_GP1_IO; |
341 | ir->mask_keycode = 0xbf; | 341 | ir->mask_keycode = 0xbf; |
342 | ir->mask_keyup = 0x40; | 342 | ir->mask_keyup = 0x40; |
343 | ir->polling = 50; /* ms */ | 343 | ir->polling = 50; /* ms */ |
344 | break; | 344 | break; |
345 | case CX88_BOARD_MSI_TVANYWHERE_MASTER: | 345 | case CX88_BOARD_MSI_TVANYWHERE_MASTER: |
346 | ir_codes = &IR_KEYTABLE(msi_tvanywhere); | 346 | ir_codes = RC_MAP_MSI_TVANYWHERE; |
347 | ir->gpio_addr = MO_GP1_IO; | 347 | ir->gpio_addr = MO_GP1_IO; |
348 | ir->mask_keycode = 0x1f; | 348 | ir->mask_keycode = 0x1f; |
349 | ir->mask_keyup = 0x40; | 349 | ir->mask_keyup = 0x40; |
@@ -351,7 +351,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) | |||
351 | break; | 351 | break; |
352 | case CX88_BOARD_AVERTV_303: | 352 | case CX88_BOARD_AVERTV_303: |
353 | case CX88_BOARD_AVERTV_STUDIO_303: | 353 | case CX88_BOARD_AVERTV_STUDIO_303: |
354 | ir_codes = &IR_KEYTABLE(avertv_303); | 354 | ir_codes = RC_MAP_AVERTV_303; |
355 | ir->gpio_addr = MO_GP2_IO; | 355 | ir->gpio_addr = MO_GP2_IO; |
356 | ir->mask_keycode = 0xfb; | 356 | ir->mask_keycode = 0xfb; |
357 | ir->mask_keydown = 0x02; | 357 | ir->mask_keydown = 0x02; |
@@ -364,41 +364,41 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) | |||
364 | case CX88_BOARD_PROF_7300: | 364 | case CX88_BOARD_PROF_7300: |
365 | case CX88_BOARD_PROF_7301: | 365 | case CX88_BOARD_PROF_7301: |
366 | case CX88_BOARD_PROF_6200: | 366 | case CX88_BOARD_PROF_6200: |
367 | ir_codes = &IR_KEYTABLE(tbs_nec); | 367 | ir_codes = RC_MAP_TBS_NEC; |
368 | ir_type = IR_TYPE_PD; | 368 | ir_type = IR_TYPE_PD; |
369 | ir->sampling = 0xff00; /* address */ | 369 | ir->sampling = 0xff00; /* address */ |
370 | break; | 370 | break; |
371 | case CX88_BOARD_TEVII_S460: | 371 | case CX88_BOARD_TEVII_S460: |
372 | case CX88_BOARD_TEVII_S420: | 372 | case CX88_BOARD_TEVII_S420: |
373 | ir_codes = &IR_KEYTABLE(tevii_nec); | 373 | ir_codes = RC_MAP_TEVII_NEC; |
374 | ir_type = IR_TYPE_PD; | 374 | ir_type = IR_TYPE_PD; |
375 | ir->sampling = 0xff00; /* address */ | 375 | ir->sampling = 0xff00; /* address */ |
376 | break; | 376 | break; |
377 | case CX88_BOARD_DNTV_LIVE_DVB_T_PRO: | 377 | case CX88_BOARD_DNTV_LIVE_DVB_T_PRO: |
378 | ir_codes = &IR_KEYTABLE(dntv_live_dvbt_pro); | 378 | ir_codes = RC_MAP_DNTV_LIVE_DVBT_PRO; |
379 | ir_type = IR_TYPE_PD; | 379 | ir_type = IR_TYPE_PD; |
380 | ir->sampling = 0xff00; /* address */ | 380 | ir->sampling = 0xff00; /* address */ |
381 | break; | 381 | break; |
382 | case CX88_BOARD_NORWOOD_MICRO: | 382 | case CX88_BOARD_NORWOOD_MICRO: |
383 | ir_codes = &IR_KEYTABLE(norwood); | 383 | ir_codes = RC_MAP_NORWOOD; |
384 | ir->gpio_addr = MO_GP1_IO; | 384 | ir->gpio_addr = MO_GP1_IO; |
385 | ir->mask_keycode = 0x0e; | 385 | ir->mask_keycode = 0x0e; |
386 | ir->mask_keyup = 0x80; | 386 | ir->mask_keyup = 0x80; |
387 | ir->polling = 50; /* ms */ | 387 | ir->polling = 50; /* ms */ |
388 | break; | 388 | break; |
389 | case CX88_BOARD_NPGTECH_REALTV_TOP10FM: | 389 | case CX88_BOARD_NPGTECH_REALTV_TOP10FM: |
390 | ir_codes = &IR_KEYTABLE(npgtech); | 390 | ir_codes = RC_MAP_NPGTECH; |
391 | ir->gpio_addr = MO_GP0_IO; | 391 | ir->gpio_addr = MO_GP0_IO; |
392 | ir->mask_keycode = 0xfa; | 392 | ir->mask_keycode = 0xfa; |
393 | ir->polling = 50; /* ms */ | 393 | ir->polling = 50; /* ms */ |
394 | break; | 394 | break; |
395 | case CX88_BOARD_PINNACLE_PCTV_HD_800i: | 395 | case CX88_BOARD_PINNACLE_PCTV_HD_800i: |
396 | ir_codes = &IR_KEYTABLE(pinnacle_pctv_hd); | 396 | ir_codes = RC_MAP_PINNACLE_PCTV_HD; |
397 | ir_type = IR_TYPE_RC5; | 397 | ir_type = IR_TYPE_RC5; |
398 | ir->sampling = 1; | 398 | ir->sampling = 1; |
399 | break; | 399 | break; |
400 | case CX88_BOARD_POWERCOLOR_REAL_ANGEL: | 400 | case CX88_BOARD_POWERCOLOR_REAL_ANGEL: |
401 | ir_codes = &IR_KEYTABLE(powercolor_real_angel); | 401 | ir_codes = RC_MAP_POWERCOLOR_REAL_ANGEL; |
402 | ir->gpio_addr = MO_GP2_IO; | 402 | ir->gpio_addr = MO_GP2_IO; |
403 | ir->mask_keycode = 0x7e; | 403 | ir->mask_keycode = 0x7e; |
404 | ir->polling = 100; /* ms */ | 404 | ir->polling = 100; /* ms */ |
@@ -439,7 +439,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) | |||
439 | ir->props.close = cx88_ir_close; | 439 | ir->props.close = cx88_ir_close; |
440 | 440 | ||
441 | /* all done */ | 441 | /* all done */ |
442 | err = __ir_input_register(ir->input, ir_codes, &ir->props, MODULE_NAME); | 442 | err = ir_input_register(ir->input, ir_codes, &ir->props, MODULE_NAME); |
443 | if (err) | 443 | if (err) |
444 | goto err_out_free; | 444 | goto err_out_free; |
445 | 445 | ||