diff options
author | David Härdeman <david@hardeman.nu> | 2014-04-04 03:31:30 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-07-24 04:50:48 +0400 |
commit | 120703f9eb32033f0e39bdc552c0273c8ab45f33 (patch) | |
tree | 427e55aad9dcfcb91e99b98d508e6fb407e8f600 /drivers/media/rc/img-ir/img-ir-jvc.c | |
parent | af3a4a9bbeb00df3e42e77240b4cdac5479812f9 (diff) | |
download | linux-120703f9eb32033f0e39bdc552c0273c8ab45f33.tar.xz |
[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/rc/img-ir/img-ir-jvc.c')
-rw-r--r-- | drivers/media/rc/img-ir/img-ir-jvc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/rc/img-ir/img-ir-jvc.c b/drivers/media/rc/img-ir/img-ir-jvc.c index 85ee90f53242..a60dda8bf706 100644 --- a/drivers/media/rc/img-ir/img-ir-jvc.c +++ b/drivers/media/rc/img-ir/img-ir-jvc.c @@ -12,7 +12,8 @@ #include "img-ir-hw.h" /* Convert JVC data to a scancode */ -static int img_ir_jvc_scancode(int len, u64 raw, int *scancode, u64 protocols) +static int img_ir_jvc_scancode(int len, u64 raw, enum rc_type *protocol, + u32 *scancode, u64 enabled_protocols) { unsigned int cust, data; @@ -22,6 +23,7 @@ static int img_ir_jvc_scancode(int len, u64 raw, int *scancode, u64 protocols) cust = (raw >> 0) & 0xff; data = (raw >> 8) & 0xff; + *protocol = RC_TYPE_JVC; *scancode = cust << 8 | data; return IMG_IR_SCANCODE; } |