• Mark A. Greer's avatar
    NFC: trf7970a: Prefix TX data when refilling FIFO · 7a1e5552
    Mark A. Greer authored
    When refilling the FIFO with more TX data (using a new
    SPI transaction), the driver must prefix the TX data with
    a write to the FIFO I/O Register.  This tells the trf7970a
    that the following data is destined for the FIFO so it can
    be transmitted.
    
    To accomplish this, the driver cannot simply push the
    prefix data just before the next set of TX data that
    is to be transmitted because that will overwrite part
    of the TX data provided by the digital layer.  Instead,
    separate the prefix data and the TX data when calling
    trf7970a_transmit().  trf7970a_transmit() can then send
    the prefix and TX data from different memory locations
    with one spi_sync() operation.  This also means that
    the driver doesn't require any skb "tx_headroom" as
    provided by the digital layer (see
    nfc_digital_allocate_device() and digital_skb_alloc()).
    
    Also ensure that the prefix is of type 'u8' and not
    'char'.
    Signed-off-by: default avatarMark A. Greer <[email protected]>
    Signed-off-by: default avatarSamuel Ortiz <[email protected]>
    7a1e5552
trf7970a.c 43 KB