On 21/09/2017 17:46, Måns Rullgård wrote:

> Marc Gonzalez writes:
> 
>> From: Mans Rullgard <m...@mansr.com>
>>
>> The tango HW IR decoder supports NEC, RC-5, RC-6 protocols.
>>
>> Signed-off-by: Marc Gonzalez <marc_gonza...@sigmadesigns.com>
> 
> Have you been able to test all the protocols?  Universal remotes usually
> support something or other with each of them.

I found the Great Pile of Remotes locked away in a drawer.
Played "What kind of batteries do you eat?" for about an hour.
And found several NEC remotes, one RC-5, and one RC-6.
Repeats seem to be handled differently than for NEC.
I'll take a closer look.

>> +    err = devm_request_irq(dev, irq, tango_ir_irq, IRQF_SHARED, 
>> dev_name(dev), ir);
>> +    if (err)
>> +            return err;
> 
> You shouldn't enable the irq until after you've configured the device.
> Otherwise you have no idea what state it's in, and it might start firing
> unexpectedly.
> 
> My original code did this properly.  Why did you move it?

I got caught up in the great devm rewrite.
Will take another swipe at it on Monday.

>> +    writel_relaxed(0x110, ir->rc5_base + IR_CTRL);
> 
> Since you've defined DISABLE_NEC above, I think you should use it here too.

OK.

Regards.

Reply via email to