summaryrefslogtreecommitdiffstats
path: root/drivers/media/rc/ir-rc5-decoder.c
diff options
context:
space:
mode:
authorSean Young2016-12-02 18:16:14 +0100
committerMauro Carvalho Chehab2017-01-30 15:10:45 +0100
commit0fcd3f0a3f8e74e0a20b66e51954a004b90f2eb2 (patch)
treea1b2e59efd3506d6bed5bf66c221256b1b94dc2b /drivers/media/rc/ir-rc5-decoder.c
parent[media] rc5x: 6th command bit is S2 bit (diff)
downloadkernel-qcow2-linux-0fcd3f0a3f8e74e0a20b66e51954a004b90f2eb2.tar.gz
kernel-qcow2-linux-0fcd3f0a3f8e74e0a20b66e51954a004b90f2eb2.tar.xz
kernel-qcow2-linux-0fcd3f0a3f8e74e0a20b66e51954a004b90f2eb2.zip
[media] rc5x: document that this is the 20 bit variant
There are many variants of extended rc5. This implements the 20 bit version. Signed-off-by: Sean Young <sean@mess.org> Cc: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/rc/ir-rc5-decoder.c')
-rw-r--r--drivers/media/rc/ir-rc5-decoder.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/rc/ir-rc5-decoder.c b/drivers/media/rc/ir-rc5-decoder.c
index a95477cb486d..484185e5248d 100644
--- a/drivers/media/rc/ir-rc5-decoder.c
+++ b/drivers/media/rc/ir-rc5-decoder.c
@@ -124,7 +124,7 @@ again:
if (data->is_rc5x && data->count == RC5X_NBITS) {
/* RC5X */
u8 xdata, command, system;
- if (!(dev->enabled_protocols & RC_BIT_RC5X)) {
+ if (!(dev->enabled_protocols & RC_BIT_RC5X_20)) {
data->state = STATE_INACTIVE;
return 0;
}
@@ -134,7 +134,7 @@ again:
toggle = (data->bits & 0x20000) ? 1 : 0;
command += (data->bits & 0x40000) ? 0 : 0x40;
scancode = system << 16 | command << 8 | xdata;
- protocol = RC_TYPE_RC5X;
+ protocol = RC_TYPE_RC5X_20;
} else if (!data->is_rc5x && data->count == RC5_NBITS) {
/* RC5 */
@@ -182,7 +182,7 @@ out:
}
static struct ir_raw_handler rc5_handler = {
- .protocols = RC_BIT_RC5 | RC_BIT_RC5X | RC_BIT_RC5_SZ,
+ .protocols = RC_BIT_RC5 | RC_BIT_RC5X_20 | RC_BIT_RC5_SZ,
.decode = ir_rc5_decode,
};