]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
V4L/DVB (8625): saa7134: Add NEC prococol IR decoding capability
authorMauro Carvalho Chehab <mchehab@infradead.org>
Tue, 5 Aug 2008 13:03:17 +0000 (10:03 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 12 Oct 2008 11:36:47 +0000 (09:36 -0200)
commit622ecb300345d308c8b4a983ac112b1985d7d156
tree2dd9156f8a5bb27826a939034d1ffa7cac671211
parentd56dc61265d2527a63ab5b0f03199a43cd89ca36
V4L/DVB (8625): saa7134: Add NEC prococol IR decoding capability

This patch adds the capability of decoding NEC protocol, received via GPIO18 line.
This GPIO port can trigger saa7134 IRQ.

A future improvement would be to make it a little more generic to work also
with GPIO16 line.

A pure IRQ code didn't work, since some delays were introduced on the tests we
did.

A possible approach would be to use polling at a rate of 2.5 ms or less. If a
new code were taken, a code similar to nec_task() could be used. However, this
would add an extra overhead to kernel, and will consume more power.

Due to that, we took an hybrid approach: an IRQ upper half to trigger when a
new key is received and a bottom half to convert pulse-distance into a keycode.

The bottom half is polling based, to improve performance. During the bottom
half proccess, GPIO18 IRQ line is disabled, preventing IRQ reentrancy and
improving performance a little bit.

Thanks to Sistema Fenix (http://www.sistemafenix.com.br/) for sponsoring this
development.

Signed-off-by: Gilberto <gilberto@sistemafenix.com.br>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/saa7134/saa7134-input.c
include/media/ir-common.h