• Mark A. Greer's avatar
    NFC: trf7970a: Ensure no more RX data before completing receive · afa5b5f1
    Mark A. Greer authored
    Depending on the interrupt status value given by the
    trf7970a, the driver may not know when a receive operation
    is complete.  To handle this, the driver waits for a period
    of time in case the trf7970a interrupts it again indicating
    there are more RX data in the FIFO.  It is possible that the
    timeout will occur when there are RX data in the FIFO but
    before the trf7970a has generated an interrupt to tell the
    driver about it.  Handle this by calling trf7970a_drain_fifo()
    (instead of trf7970a_send_upstream() which just passes up the
    data gathered to far) to check if there are more data in the
    FIFO.  If so, gather that data into the receive buffer.  If
    not, pass the data collected so far upstream as before.
    Signed-off-by: default avatarMark A. Greer <mgreer@animalcreek.com>
    Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
    afa5b5f1
trf7970a.c 43.8 KB