1. 14 Jun, 2013 7 commits
    • Samuel Ortiz's avatar
      NFC: Extend and fix the internal secure element API · 0a946301
      Samuel Ortiz authored
      Secure elements need to be discovered after enabling the NFC controller.
      This is typically done by the NCI core and the HCI drivers (HCI does not
      specify how to discover SEs, it is left to the specific drivers).
      Also, the SE enable/disable API explicitely takes a SE index as its
      argument.
      Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
      0a946301
    • Samuel Ortiz's avatar
      NFC: Remove the static supported_se field · 0b456c41
      Samuel Ortiz authored
      Supported secure elements are typically found during a discovery process
      initiated when the NFC controller is up and running. For a given NFC
      chipset there can be many configurations (embedded SE or not, with or
      without a SIM card wired to the NFC controller SWP interface, etc...) and
      thus driver code will never know before hand which SEs are available.
      So we remove this field, it will be replaced by a real SE discovery
      mechanism.
      Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
      0b456c41
    • Samuel Ortiz's avatar
      NFC: pn533: Copy NFCID2 through ATR_REQ · 322bce95
      Samuel Ortiz authored
      When using NFC-F we should copy the NFCID2 buffer that we got from
      SENSF_RES through the ATR_REQ NFCID3 buffer. Not doing so violates
      NFC Forum digital requirement #189.
      Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
      322bce95
    • Samuel Ortiz's avatar
      NFC: pn533: Use 0x3 for SENSF_REQ Time Slot Number (TSN) · 31c44464
      Samuel Ortiz authored
      LLCP validation requires TSN to be 0x03 for type F.
      Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
      31c44464
    • Frederic Danis's avatar
      NFC: Add NCI over SPI receive · 391d8a2d
      Frederic Danis authored
      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: default avatarFrederic Danis <frederic.danis@linux.intel.com>
      Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
      391d8a2d
    • Frederic Danis's avatar
      NFC: Add NCI over SPI send · ee9596d4
      Frederic Danis authored
      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: default avatarFrederic Danis <frederic.danis@linux.intel.com>
      Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
      ee9596d4
    • Frederic Danis's avatar
      NFC: Add basic NCI over SPI · 8a00a61b
      Frederic Danis authored
      The NFC Forum defines a transport interface based on
      Serial Peripheral Interface (SPI) for the NFC Controller
      Interface (NCI).
      
      This module implements the SPI transport of NCI, calling SPI module
      directly to read/write data to NFC controller (NFCC).
      
      NFCC driver should provide functions performing device open and close.
      It should also provide functions asserting/de-asserting interruption
      to prevent TX/RX race conditions.
      NFCC driver can also fix a delay between transactions if needed by
      the hardware.
      Signed-off-by: default avatarFrederic Danis <frederic.danis@linux.intel.com>
      Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
      8a00a61b
  2. 13 Jun, 2013 13 commits
  3. 12 Jun, 2013 20 commits