aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/ttpci/av7110.c
diff options
context:
space:
mode:
authorOliver Endriss <o.endriss@gmx.de>2007-04-27 11:31:21 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-04-27 14:43:45 -0400
commitee820a648fb333034aa455e8e1479b89798a1281 (patch)
tree2bb8611029075d0ff068394b6aaad9b5ea46f057 /drivers/media/dvb/ttpci/av7110.c
parentdb4836791dc578f0f6e9573468cffeee00fa7ebc (diff)
V4L/DVB (5334): Dvb-ttpci: Infrared remote control refactoring
Infrared remote control support rewritten. Now each device provides its own event device, keymap, protocol, inversion and address setting. EVIOCGKEYCODE and EVIOCSKEYCODE ioctls are supported to read/modify a keymap. Keymaps may be loaded using - input tools (keyb etc.) - av7110_loadkeys (obsolete, for backward compatibility) New command line parameters: - ir_protocol: select infrared protocol: 0 RC5, 1 RCMM (default) - ir_inversion: signal inversion: 0 not inverted (default), 1 inverted - ir_device_mask: bitmask of infrared devices (default: accept all) Those parameters may be set anytime. Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/ttpci/av7110.c')
-rw-r--r--drivers/media/dvb/ttpci/av7110.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c
index 29ed532ba966..3cd85231a0cd 100644
--- a/drivers/media/dvb/ttpci/av7110.c
+++ b/drivers/media/dvb/ttpci/av7110.c
@@ -219,7 +219,10 @@ static void recover_arm(struct av7110 *av7110)
219 av7110->recover(av7110); 219 av7110->recover(av7110);
220 220
221 restart_feeds(av7110); 221 restart_feeds(av7110);
222 av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, SetIR, 1, av7110->ir_config); 222
223#if defined(CONFIG_INPUT_EVDEV) || defined(CONFIG_INPUT_EVDEV_MODULE)
224 av7110_check_ir_config(av7110, true);
225#endif
223} 226}
224 227
225static void av7110_arm_sync(struct av7110 *av7110) 228static void av7110_arm_sync(struct av7110 *av7110)
@@ -250,6 +253,10 @@ static int arm_thread(void *data)
250 if (!av7110->arm_ready) 253 if (!av7110->arm_ready)
251 continue; 254 continue;
252 255
256#if defined(CONFIG_INPUT_EVDEV) || defined(CONFIG_INPUT_EVDEV_MODULE)
257 av7110_check_ir_config(av7110, false);
258#endif
259
253 if (mutex_lock_interruptible(&av7110->dcomlock)) 260 if (mutex_lock_interruptible(&av7110->dcomlock))
254 break; 261 break;
255 newloops = rdebi(av7110, DEBINOSWAP, STATUS_LOOPS, 0, 2); 262 newloops = rdebi(av7110, DEBINOSWAP, STATUS_LOOPS, 0, 2);
@@ -667,8 +674,8 @@ static void gpioirq(unsigned long data)
667 return; 674 return;
668 675
669 case DATA_IRCOMMAND: 676 case DATA_IRCOMMAND:
670 if (av7110->ir_handler) 677 if (av7110->ir.ir_handler)
671 av7110->ir_handler(av7110, 678 av7110->ir.ir_handler(av7110,
672 swahw32(irdebi(av7110, DEBINOSWAP, Reserved, 0, 4))); 679 swahw32(irdebi(av7110, DEBINOSWAP, Reserved, 0, 4)));
673 iwdebi(av7110, DEBINOSWAP, RX_BUFF, 0, 2); 680 iwdebi(av7110, DEBINOSWAP, RX_BUFF, 0, 2);
674 break; 681 break;