diff options
author | Frederic Danis <frederic.danis@linux.intel.com> | 2013-05-29 15:35:04 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-06-14 13:44:16 +0200 |
commit | 391d8a2da787257aeaf952c974405b53926e3fb3 (patch) | |
tree | 038e24a044d3f3780c76d61a13f65c038e8c05bc /drivers/nfc | |
parent | ee9596d467e4d05c77a8c883aeeb5b74d1a3cd31 (diff) | |
download | linux-391d8a2da787257aeaf952c974405b53926e3fb3.tar.gz linux-391d8a2da787257aeaf952c974405b53926e3fb3.tar.bz2 linux-391d8a2da787257aeaf952c974405b53926e3fb3.zip |
NFC: Add NCI over SPI receive
Before any operation, driver interruption is de-asserted to prevent
race condition between TX and RX.
Transaction starts by emitting "Direct read" and acknowledged mode
bytes. Then packet length is read allowing to allocate correct NCI
socket buffer. After that payload is retrieved.
A delay after the transaction can be added.
This delay is determined by the driver during nci_spi_allocate_device()
call and can be 0.
If acknowledged mode is set:
- CRC of header and payload is checked
- if frame reception fails (CRC error): NACK is sent
- if received frame has ACK or NACK flag: unblock nci_spi_send()
Payload is passed to NCI module.
At the end, driver interruption is re asserted.
Signed-off-by: Frederic Danis <frederic.danis@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc')
0 files changed, 0 insertions, 0 deletions