diff options
author | Frederic Danis <frederic.danis@linux.intel.com> | 2013-05-29 15:35:03 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-06-14 13:44:15 +0200 |
commit | ee9596d467e4d05c77a8c883aeeb5b74d1a3cd31 (patch) | |
tree | 256dad6d872ced15c55723fcdccfcdcf3d87734a /include/net/nfc | |
parent | NFC: Add basic NCI over SPI (diff) | |
download | linux-ee9596d467e4d05c77a8c883aeeb5b74d1a3cd31.tar.xz linux-ee9596d467e4d05c77a8c883aeeb5b74d1a3cd31.zip |
NFC: Add NCI over SPI send
Before any operation, driver interruption is de-asserted to prevent
race condition between TX and RX.
The NCI over SPI header is added in front of NCI packet.
If acknowledged mode is set, CRC-16-CCITT is added to the packet.
Then the packet is forwarded to SPI module to be sent.
A delay after the transaction is added.
This delay is determined by the driver during nci_spi_allocate_device()
call and can be 0.
After data has been sent, driver interruption is re-asserted.
If acknowledged mode is set, nci_spi_send will block until
acknowledgment is received.
Signed-off-by: Frederic Danis <frederic.danis@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/net/nfc')
-rw-r--r-- | include/net/nfc/nci_core.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/nfc/nci_core.h b/include/net/nfc/nci_core.h index 3b05bebd8235..36df525d2ab3 100644 --- a/include/net/nfc/nci_core.h +++ b/include/net/nfc/nci_core.h @@ -226,6 +226,9 @@ struct nci_spi_dev { transactions */ u8 acknowledge_mode; + struct completion req_completion; + u8 req_result; + void *driver_data; }; |