Commit 85e4af0a authored by Matthias Reichl's avatar Matthias Reichl Committed by Mauro Carvalho Chehab

media: rc: ir-rc6-decoder: enable toggle bit for Kathrein RCU-676 remote

The Kathrein RCU-676 remote uses the 32-bit rc6 protocol and toggles
bit 15 (0x8000) on repeated button presses, like MCE remotes.

Add it's customer code 0x80460000 to the 32-bit rc6 toggle
handling code to get proper scancodes and toggle reports.
Signed-off-by: default avatarMatthias Reichl <hias@horus.com>
Signed-off-by: default avatarSean Young <sean@mess.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 183e19f5
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#define RC6_6A_MCE_TOGGLE_MASK 0x8000 /* for the body bits */ #define RC6_6A_MCE_TOGGLE_MASK 0x8000 /* for the body bits */
#define RC6_6A_LCC_MASK 0xffff0000 /* RC6-6A-32 long customer code mask */ #define RC6_6A_LCC_MASK 0xffff0000 /* RC6-6A-32 long customer code mask */
#define RC6_6A_MCE_CC 0x800f0000 /* MCE customer code */ #define RC6_6A_MCE_CC 0x800f0000 /* MCE customer code */
#define RC6_6A_KATHREIN_CC 0x80460000 /* Kathrein RCU-676 customer code */
#ifndef CHAR_BIT #ifndef CHAR_BIT
#define CHAR_BIT 8 /* Normally in <limits.h> */ #define CHAR_BIT 8 /* Normally in <limits.h> */
#endif #endif
...@@ -242,13 +243,17 @@ static int ir_rc6_decode(struct rc_dev *dev, struct ir_raw_event ev) ...@@ -242,13 +243,17 @@ static int ir_rc6_decode(struct rc_dev *dev, struct ir_raw_event ev)
toggle = 0; toggle = 0;
break; break;
case 32: case 32:
if ((scancode & RC6_6A_LCC_MASK) == RC6_6A_MCE_CC) { switch (scancode & RC6_6A_LCC_MASK) {
case RC6_6A_MCE_CC:
case RC6_6A_KATHREIN_CC:
protocol = RC_PROTO_RC6_MCE; protocol = RC_PROTO_RC6_MCE;
toggle = !!(scancode & RC6_6A_MCE_TOGGLE_MASK); toggle = !!(scancode & RC6_6A_MCE_TOGGLE_MASK);
scancode &= ~RC6_6A_MCE_TOGGLE_MASK; scancode &= ~RC6_6A_MCE_TOGGLE_MASK;
} else { break;
default:
protocol = RC_PROTO_RC6_6A_32; protocol = RC_PROTO_RC6_6A_32;
toggle = 0; toggle = 0;
break;
} }
break; break;
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment