@@ -50,6 +50,7 @@ static int ir_nec_decode(struct input_dev *input_dev, struct ir_raw_event ev)
struct nec_dec *data = &ir_dev->raw->nec;
u32 scancode;
u8 address, not_address, command, not_command;
+ bool apple = false;
if (!(ir_dev->raw->enabled_protocols & IR_TYPE_NEC))
return 0;
@@ -158,7 +159,14 @@ static int ir_nec_decode(struct input_dev *input_dev, struct ir_raw_event ev)
command = bitrev8((data->bits >> 8) & 0xff);
not_command = bitrev8((data->bits >> 0) & 0xff);
- if ((command ^ not_command) != 0xff) {
+ /* Apple remotes use an NEC-like proto, but w/o a checksum */
+ if ((address == 0xee) && (not_address == 0x87)) {
+ apple = true;
+ IR_dprintk(1, "Apple remote, ID byte 0x%02x\n",
+ not_command);
+ }
+
+ if (((command ^ not_command) != 0xff) && !apple) {
IR_dprintk(1, "NEC checksum error: received 0x%08x\n",
data->bits);
break;