aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/saa7134/saa7134-input.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-04-06 23:21:46 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-19 12:57:02 -0300
commit626cf6979e99bf2c642456308bed7bb25a37569b (patch)
tree4a5654588a37399f9240639d75064901c8737d8c /drivers/media/video/saa7134/saa7134-input.c
parentde88f31cef8fee7c890cf2128bec8dae06bb20f2 (diff)
V4L/DVB: ir-core: Distinguish sysfs attributes for in-hardware and raw decoders
Some devices have in-hardware Remote Controller decoder, while others need a software decoder to get the IR code. As each software decoder can be enabled/disabled individually, allowing multiple protocol decoding capability. On the other hand, hardware decoders have a limited protocol support, often being able of decoding just one protocol each time. So, each type needs a different set of capabilities to control the supported protocol(s). Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-input.c')
-rw-r--r--drivers/media/video/saa7134/saa7134-input.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c
index 867f027c3fe..6d5fe596245 100644
--- a/drivers/media/video/saa7134/saa7134-input.c
+++ b/drivers/media/video/saa7134/saa7134-input.c
@@ -855,6 +855,9 @@ int saa7134_input_init1(struct saa7134_dev *dev)
ir->props.open = saa7134_ir_open;
ir->props.close = saa7134_ir_close;
+ if (raw_decode)
+ ir->props.driver_type = RC_DRIVER_IR_RAW;
+
if (!raw_decode && allow_protocol_change) {
ir->props.allowed_protos = IR_TYPE_RC5 | IR_TYPE_NEC;
ir->props.change_protocol = saa7134_ir_change_protocol;
@@ -880,11 +883,6 @@ int saa7134_input_init1(struct saa7134_dev *dev)
err = ir_input_register(ir->dev, ir_codes, &ir->props, MODULE_NAME);
if (err)
goto err_out_free;
- if (raw_decode) {
- err = ir_raw_event_register(ir->dev);
- if (err)
- goto err_out_free;
- }
/* the remote isn't as bouncy as a keyboard */
ir->dev->rep[REP_DELAY] = repeat_delay;
@@ -904,7 +902,6 @@ void saa7134_input_fini(struct saa7134_dev *dev)
return;
saa7134_ir_stop(dev);
- ir_raw_event_unregister(dev->remote->dev);
ir_input_unregister(dev->remote->dev);
kfree(dev->remote);
dev->remote = NULL;