[media] nuvoton-cir: add proper rx fifo overrun handling
authorJarod Wilson <jarod@redhat.com>
Fri, 8 Oct 2010 19:16:23 +0000 (16:16 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 21 Oct 2010 03:18:32 +0000 (01:18 -0200)
commitfbdc781c6ba9742b475ca9979007ea12bed0d044
tree92f3de4e320eca636f5f517a9f6931f76f1c7ea0
parent6d2f5c27880c2c72e35432eae10c7a74251050c0
[media] nuvoton-cir: add proper rx fifo overrun handling

Per discussion with Andy Walls on irc, rx fifo overruns are not all that
uncommon on a busy system, and the initial posting of the nuvoton-cir
driver doesn't handle them well enough. With this addition, we'll drain
the hw fifo, attempt to process any ir pulse trains completed with that
flush, then we'll issue a hw rx fifo clear and reset the raw ir sample
kfifo and start over collecting raw ir data.

Also slightly refactors the cir interrupt enabling so that we always get
consistent flags set and only have to modify them in one place, should
they need to be altered.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/IR/nuvoton-cir.c