]> git.baikalelectronics.ru Git - kernel.git/commit
NFC: trf7970a: Prefix TX data when refilling FIFO
authorMark A. Greer <mgreer@animalcreek.com>
Tue, 2 Sep 2014 22:12:28 +0000 (15:12 -0700)
committerSamuel Ortiz <sameo@linux.intel.com>
Sun, 7 Sep 2014 21:13:43 +0000 (23:13 +0200)
commite55d6483fc9497fb8e7ca5f8bbd8b616f1650241
tree8060c684663bf06b1bf9a57c4831049e10dc9a61
parent738fb8bbb9f34f381185887ad2b6b675e3cb3b84
NFC: trf7970a: Prefix TX data when refilling FIFO

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: Mark A. Greer <mgreer@animalcreek.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/nfc/trf7970a.c