1. 09 6月, 2015 2 次提交
  2. 06 4月, 2015 1 次提交
  3. 26 3月, 2015 1 次提交
  4. 04 2月, 2015 3 次提交
  5. 03 2月, 2015 5 次提交
  6. 02 12月, 2014 4 次提交
  7. 28 11月, 2014 1 次提交
    • J
      NFC: NCI: Handle Target mode activation · a99903ec
      Julien Lefrique 提交于
      Changes:
      
       * Extract the Listen mode activation parameters from RF_INTF_ACTIVATED_NTF.
      
       * Store the General Bytes of ATR_REQ.
      
       * Signal that Target mode is activated in case of an activation in NFC-DEP.
      
       * Update the NCI state accordingly.
      
       * Use the various constants defined in nfc.h.
      
       * Fix the ATR_REQ and ATR_RES maximum size. As per NCI 1.0 and NCI 1.1, the
         Activation Parameters for both Poll and Listen mode contain all the bytes of
         ATR_REQ/ATR_RES starting and including Byte 3 as defined in [DIGITAL].
         In [DIGITAL], the maximum size of ATR_REQ/ATR_RES is 64 bytes and they are
         numbered starting from Byte 1.
      Signed-off-by: NJulien Lefrique <lefrique@marvell.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      a99903ec
  8. 24 9月, 2014 1 次提交
    • C
      NFC: nci: Add support for proprietary RF Protocols · 9e87f9a9
      Christophe Ricard 提交于
      In NFC Forum NCI specification, some RF Protocol values are
      reserved for proprietary use (from 0x80 to 0xfe).
      Some CLF vendor may need to use one value within this range
      for specific technology.
      Furthermore, some CLF may not becompliant with NFC Froum NCI
      specification 2.0 and therefore will not support RF Protocol
      value 0x06 for PROTOCOL_T5T as mention in a draft specification
      and in a recent push.
      
      Adding get_rf_protocol handle to the nci_ops structure will
      help to set the correct technology to target.
      Signed-off-by: NChristophe Ricard <christophe-h.ricard@st.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      9e87f9a9
  9. 07 1月, 2014 2 次提交
  10. 07 12月, 2013 1 次提交
  11. 25 9月, 2013 4 次提交
    • E
      NFC: NCI: Modify NCI SPI to implement CS/INT handshake per the spec · 2bed2785
      Eric Lapuyade 提交于
      The NFC Forum NCI specification defines both a hardware and software
      protocol when using a SPI physical transport to connect an NFC NCI
      Chipset. The hardware requirement is that, after having raised the chip
      select line, the SPI driver must wait for an INT line from the NFC
      chipset to raise before it sends the data. The chip select must be
      raised first though, because this is the signal that the NFC chipset
      will detect to wake up and then raise its INT line. If the INT line
      doesn't raise in a timely fashion, the SPI driver should abort
      operation.
      
      When data is transferred from Device host (DH) to NFC Controller (NFCC),
      the signaling sequence is the following:
      
      Data Transfer from DH to NFCC
      • 1-Master asserts SPI_CSN
      • 2-Slave asserts SPI_INT
      • 3-Master sends NCI-over-SPI protocol header and payload data
      • 4-Slave deasserts SPI_INT
      • 5-Master deasserts SPI_CSN
      
      When data must be transferred from NFCC to DH, things are a little bit
      different.
      
      Data Transfer from NFCC to DH
      • 1-Slave asserts SPI_INT -> NFC chipset irq handler called -> process
      reading from SPI
      • 2-Master asserts SPI_CSN
      • 3-Master send 2-octet NCI-over-SPI protocol header
      • 4-Slave sends 2-octet NCI-over-SPI protocol payload length
      • 5-Slave sends NCI-over-SPI protocol payload
      • 6-Master deasserts SPI_CSN
      
      In this case, SPI driver should function normally as it does today. Note
      that the INT line can and will be lowered anytime between beginning of
      step 3 and end of step 5. A low INT is therefore valid after chip select
      has been raised.
      
      This would be easily implemented in a single driver. Unfortunately, we
      don't write the SPI driver and I had to imagine some workaround trick to
      get the SPI and NFC drivers to work in a synchronized fashion. The trick
      is the following:
      
      - send an empty spi message: this will raise the chip select line, and
      send nothing. We expect the /CS line will stay arisen because we asked
      for it in the spi_transfer cs_change field
      - wait for a completion, that will be completed by the NFC driver IRQ
      handler when it knows we are in the process of sending data (NFC spec
      says that we use SPI in a half duplex mode, so we are either sending or
      receiving).
      - when completed, proceed with the normal data send.
      
      This has been tested and verified to work very consistently on a Nexus
      10 (spi-s3c64xx driver). It may not work the same with other spi
      drivers.
      
      The previously defined nci_spi_ops{} whose intended purpose were to
      address this problem are not used anymore and therefore totally removed.
      
      The nci_spi_send() takes a new optional write_handshake_completion
      completion pointer. If non NULL, the nci spi layer will run the above
      trick when sending data to the NFC Chip. If NULL, the data is sent
      normally all at once and it is then the NFC driver responsibility to
      know what it's doing.
      Signed-off-by: NEric Lapuyade <eric.lapuyade@intel.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      2bed2785
    • E
      NFC: NCI: nci_spi_recv_frame() now returns (not forward) the read frame · 22d4aae5
      Eric Lapuyade 提交于
      Previously, nci_spi_recv_frame() would directly transmit incoming frames
      to the NCI Core. However, it turns out that some NFC NCI Chips will add
      additional proprietary headers that must be handled/removed before NCI
      Core gets a chance to handle the frame. With this modification, the chip
      phy or driver are now responsible to transmit incoming frames to NCI
      Core after proper treatment, and NCI SPI becomes a driver helper instead
      of sitting between the NFC driver and NCI Core.
      
      As a general rule in NFC, *_recv_frame() APIs are used to deliver an
      incoming frame to an upper layer. To better suit the actual purpose of
      nci_spi_recv_frame(), and go along with its nci_spi_send()
      counterpart, the function is renamed to nci_spi_read()
      
      The skb is returned as the function result
      Signed-off-by: NEric Lapuyade <eric.lapuyade@intel.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      22d4aae5
    • E
      NFC: NCI: Simplify NCI SPI to become a simple framing/checking layer · fa544fff
      Eric Lapuyade 提交于
      NCI SPI layer should not manage the nci dev, this is the job of the nci
      chipset driver. This layer should be limited to frame/deframe nci
      packets, and optionnaly check integrity (crc) and manage the ack/nak
      protocol.
      
      The NCI SPI must not be mixed up with an NCI dev. spi_[dev|device] are
      therefore renamed to a simple spi for more clarity.
      The header and crc sizes are moved to nci.h so that drivers can use
      them to reserve space in outgoing skbs.
      nci_spi_send() is exported to be accessible by drivers.
      Signed-off-by: NEric Lapuyade <eric.lapuyade@intel.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      fa544fff
    • E
      NFC: NCI: Rename spi ndev -> nsdev and nci_dev -> ndev for consistency · d5937511
      Eric Lapuyade 提交于
      An hci dev is an hdev. An nci dev is an ndev. Calling an nci spi dev an
      ndev is misleading since it's not the same thing. The nci dev contained
      in the nci spi dev is also named inconsistently.
      Signed-off-by: NEric Lapuyade <eric.lapuyade@intel.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      d5937511
  12. 14 6月, 2013 5 次提交
    • S
      NFC: Remove the static supported_se field · 0b456c41
      Samuel Ortiz 提交于
      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: NSamuel Ortiz <sameo@linux.intel.com>
      0b456c41
    • F
      NFC: Add NCI over SPI receive · 391d8a2d
      Frederic Danis 提交于
      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: NFrederic Danis <frederic.danis@linux.intel.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      391d8a2d
    • F
      NFC: Add NCI over SPI send · ee9596d4
      Frederic Danis 提交于
      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: NFrederic Danis <frederic.danis@linux.intel.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      ee9596d4
    • F
      NFC: Add basic NCI over SPI · 8a00a61b
      Frederic Danis 提交于
      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: NFrederic Danis <frederic.danis@linux.intel.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      8a00a61b
    • F
      NFC: NCI: Fix skb->dev usage · 1095e69f
      Frederic Danis 提交于
      skb->dev is used for carrying a net_device pointer and not
      an nci_dev pointer.
      
      Remove usage of skb-dev to carry nci_dev and replace it by parameter
      in nci_recv_frame(), nci_send_frame() and driver send() functions.
      
      NfcWilink driver is also updated to use those functions.
      Signed-off-by: NFrederic Danis <frederic.danis@linux.intel.com>
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      1095e69f
  13. 10 1月, 2013 1 次提交
    • S
      NFC: Initial Secure Element API · 390a1bd8
      Samuel Ortiz 提交于
      Each NFC adapter can have several links to different secure elements and
      that property needs to be exported by the drivers.
      A secure element link can be enabled and disabled, and card emulation will
      be handled by the currently active one. Otherwise card emulation will be
      host implemented.
      Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
      390a1bd8
  14. 25 9月, 2012 2 次提交
  15. 07 3月, 2012 1 次提交
  16. 25 1月, 2012 4 次提交
  17. 05 1月, 2012 1 次提交
  18. 12 11月, 2011 1 次提交