• Jarod Wilson's avatar
    [media] nuvoton-cir: add proper rx fifo overrun handling · fbdc781c
    Jarod Wilson authored
    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: default avatarJarod Wilson <jarod@redhat.com>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
    fbdc781c
nuvoton-cir.c 33.4 KB