diff options
author | David Härdeman <david@hardeman.nu> | 2014-04-03 20:31:30 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-07-23 21:50:48 -0300 |
commit | 120703f9eb32033f0e39bdc552c0273c8ab45f33 (patch) | |
tree | 427e55aad9dcfcb91e99b98d508e6fb407e8f600 /drivers/media/pci/bt8xx | |
parent | af3a4a9bbeb00df3e42e77240b4cdac5479812f9 (diff) | |
download | blackbird-op-linux-120703f9eb32033f0e39bdc552c0273c8ab45f33.tar.gz blackbird-op-linux-120703f9eb32033f0e39bdc552c0273c8ab45f33.zip |
[media] rc-core: document the protocol type
Right now the protocol information is not preserved, rc-core gets handed a
scancode but has no idea which protocol it corresponds to.
This patch (which required reading through the source/keymap for all drivers,
not fun) makes the protocol information explicit which is important
documentation and makes it easier to e.g. support multiple protocols with one
decoder (think rc5 and rc-streamzap). The information isn't used yet so there
should be no functional changes.
[m.chehab@samsung.com: rebased, added cxusb and removed bad whitespacing]
Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/pci/bt8xx')
-rw-r--r-- | drivers/media/pci/bt8xx/bttv-input.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/pci/bt8xx/bttv-input.c b/drivers/media/pci/bt8xx/bttv-input.c index e745f5a04a40..67c8d6b2c335 100644 --- a/drivers/media/pci/bt8xx/bttv-input.c +++ b/drivers/media/pci/bt8xx/bttv-input.c @@ -73,12 +73,12 @@ static void ir_handle_key(struct bttv *btv) if ((ir->mask_keydown && (gpio & ir->mask_keydown)) || (ir->mask_keyup && !(gpio & ir->mask_keyup))) { - rc_keydown_notimeout(ir->dev, data, 0); + rc_keydown_notimeout(ir->dev, RC_TYPE_UNKNOWN, data, 0); } else { /* HACK: Probably, ir->mask_keydown is missing for this board */ if (btv->c.type == BTTV_BOARD_WINFAST2000) - rc_keydown_notimeout(ir->dev, data, 0); + rc_keydown_notimeout(ir->dev, RC_TYPE_UNKNOWN, data, 0); rc_keyup(ir->dev); } @@ -103,7 +103,7 @@ static void ir_enltv_handle_key(struct bttv *btv) gpio, data, (gpio & ir->mask_keyup) ? " up" : "up/down"); - rc_keydown_notimeout(ir->dev, data, 0); + rc_keydown_notimeout(ir->dev, RC_TYPE_UNKNOWN, data, 0); if (keyup) rc_keyup(ir->dev); } else { @@ -117,7 +117,7 @@ static void ir_enltv_handle_key(struct bttv *btv) if (keyup) rc_keyup(ir->dev); else - rc_keydown_notimeout(ir->dev, data, 0); + rc_keydown_notimeout(ir->dev, RC_TYPE_UNKNOWN, data, 0); } ir->last_gpio = data | keyup; @@ -241,8 +241,8 @@ static void bttv_rc5_timer_end(unsigned long data) return; } - scancode = system << 8 | command; - rc_keydown(ir->dev, scancode, toggle); + scancode = RC_SCANCODE_RC5(system, command); + rc_keydown(ir->dev, RC_TYPE_RC5, scancode, toggle); dprintk("scancode %x, toggle %x\n", scancode, toggle); } |