<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/net/nfc, branch v3.14</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/include/net/nfc?h=v3.14</id>
<link rel='self' href='https://git.amat.us/linux/atom/include/net/nfc?h=v3.14'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2014-01-17T19:43:17Z</updated>
<entry>
<title>Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem</title>
<updated>2014-01-17T19:43:17Z</updated>
<author>
<name>John W. Linville</name>
<email>linville@tuxdriver.com</email>
</author>
<published>2014-01-17T19:43:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7916a075571f0ccd0830cf3da293188a8b6045e3'/>
<id>urn:sha1:7916a075571f0ccd0830cf3da293188a8b6045e3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>NFC: NCI: Add set_config API</title>
<updated>2014-01-07T00:32:40Z</updated>
<author>
<name>Amitkumar Karwar</name>
<email>akarwar@marvell.com</email>
</author>
<published>2014-01-06T20:58:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=22c15bf30b70ab2eae300f093ffc64e182620aba'/>
<id>urn:sha1:22c15bf30b70ab2eae300f093ffc64e182620aba</id>
<content type='text'>
This API can be used by drivers to send their custom
configuration using SET_CONFIG NCI command to the device.

Signed-off-by: Amitkumar Karwar &lt;akarwar@marvell.com&gt;
Signed-off-by: Bing Zhao &lt;bzhao@marvell.com&gt;
Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>NFC: NCI: Add setup handler</title>
<updated>2014-01-07T00:32:40Z</updated>
<author>
<name>Amitkumar Karwar</name>
<email>akarwar@marvell.com</email>
</author>
<published>2014-01-06T20:58:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=86e8586ed5beea15ce7c359f02a1084c2da93bc7'/>
<id>urn:sha1:86e8586ed5beea15ce7c359f02a1084c2da93bc7</id>
<content type='text'>
Some drivers require special configuration while initializing.
This patch adds setup handler for this custom configuration.

Signed-off-by: Amitkumar Karwar &lt;akarwar@marvell.com&gt;
Signed-off-by: Bing Zhao &lt;bzhao@marvell.com&gt;
Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>NFC: digital: Add a note about asynchronous functions</title>
<updated>2014-01-04T02:35:34Z</updated>
<author>
<name>Thierry Escande</name>
<email>thierry.escande@linux.intel.com</email>
</author>
<published>2014-01-02T10:58:12Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=444fb98eed98f7292a83f9bf123d1c78f171327e'/>
<id>urn:sha1:444fb98eed98f7292a83f9bf123d1c78f171327e</id>
<content type='text'>
This explains how and why the timeout parameter must be handled by the
driver implementation.

Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>include/net/: Fix FSF address in file headers</title>
<updated>2013-12-06T17:37:56Z</updated>
<author>
<name>Jeff Kirsher</name>
<email>jeffrey.t.kirsher@intel.com</email>
</author>
<published>2013-12-06T17:13:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a6227e26d946bc56df47ca5fe418660a07ef8288'/>
<id>urn:sha1:a6227e26d946bc56df47ca5fe418660a07ef8288</id>
<content type='text'>
Several files refer to an old address for the Free Software Foundation
in the file header comment.  Resolve by replacing the address with
the URL &lt;http://www.gnu.org/licenses/&gt; so that we do not have to keep
updating the header comments anytime the address changes.

Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>NFC: NCI: Modify NCI SPI to implement CS/INT handshake per the spec</title>
<updated>2013-09-25T12:59:56Z</updated>
<author>
<name>Eric Lapuyade</name>
<email>eric.lapuyade@linux.intel.com</email>
</author>
<published>2013-09-23T15:56:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2bed27851767d93b5d2823eee110857f350a9fbe'/>
<id>urn:sha1:2bed27851767d93b5d2823eee110857f350a9fbe</id>
<content type='text'>
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 -&gt; NFC chipset irq handler called -&gt; 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: Eric Lapuyade &lt;eric.lapuyade@intel.com&gt;
Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>NFC: NCI: nci_spi_recv_frame() now returns (not forward) the read frame</title>
<updated>2013-09-25T12:25:41Z</updated>
<author>
<name>Eric Lapuyade</name>
<email>eric.lapuyade@linux.intel.com</email>
</author>
<published>2013-09-23T15:56:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=22d4aae5897fb8355130b8f7d9a3af153eac9714'/>
<id>urn:sha1:22d4aae5897fb8355130b8f7d9a3af153eac9714</id>
<content type='text'>
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: Eric Lapuyade &lt;eric.lapuyade@intel.com&gt;
Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>NFC: Define secure element IO API and commands</title>
<updated>2013-09-25T00:30:47Z</updated>
<author>
<name>Samuel Ortiz</name>
<email>sameo@linux.intel.com</email>
</author>
<published>2013-08-27T22:39:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=72b70b6ec4fa7da86a3ac0aacee699b18d94fc3b'/>
<id>urn:sha1:72b70b6ec4fa7da86a3ac0aacee699b18d94fc3b</id>
<content type='text'>
In order to send and receive ISO7816 APDUs to and from NFC embedded
secure elements, we define a specific netlink command.
On a typical SE use case, host applications will send very few APDUs
(Less than 10) per transaction. This is why we decided to go for a
simple netlink API. Defining another NFC socket protocol for such low
traffic would have been overengineered.

Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>NFC: Document NFC targets sens_res field</title>
<updated>2013-09-25T00:02:44Z</updated>
<author>
<name>Samuel Ortiz</name>
<email>sameo@linux.intel.com</email>
</author>
<published>2013-09-24T10:40:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b9c0c678f7267831b73e1d73fb30c9b4658e91ec'/>
<id>urn:sha1:b9c0c678f7267831b73e1d73fb30c9b4658e91ec</id>
<content type='text'>
SENS_RES has no specific endiannes attached to it, the kernel ABI is the
following one: Byte 2 (As described by the NFC Forum Digital spec) is
the u16 most significant byte.

Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>NFC Digital: Add NFC-A technology support</title>
<updated>2013-09-25T00:02:23Z</updated>
<author>
<name>Thierry Escande</name>
<email>thierry.escande@linux.intel.com</email>
</author>
<published>2013-09-19T15:55:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2c66daecc4092e6049673c281b2e6f0d5e59a94c'/>
<id>urn:sha1:2c66daecc4092e6049673c281b2e6f0d5e59a94c</id>
<content type='text'>
This adds support for NFC-A technology at 106 kbits/s. The stack can
detect tags of type 1 and 2. There is no support for collision
detection. Tags can be read and written by using a user space
application or a daemon like neard.

The flow of polling operations for NFC-A detection is as follow:

1 - The digital stack sends the SENS_REQ command to the NFC device.
2 - The NFC device receives a SENS_RES response from a peer device and
    passes it to the digital stack.
3   - If the SENS_RES response identifies a type 1 tag, detection ends.
      NFC core is notified through nfc_targets_found().
4   - Otherwise, the digital stack sets the cascade level of NFCID1 to
      CL1 and sends the SDD_REQ command.
5 - The digital stack selects SEL_CMD and SEL_PAR according to the
    cascade level and sends the SDD_REQ command.
4 - The digital stack receives a SDD_RES response for the cascade level
    passed in the SDD_REQ command.
5 - The digital stack analyses (part of) NFCID1 and verify BCC.
6 - The digital stack sends the SEL_REQ command with the NFCID1
    received in the SDD_RES.
6 - The peer device replies with a SEL_RES response
7   - Detection ends if NFCID1 is complete. NFC core notified of new
      target by nfc_targets_found().
8   - If NFCID1 is not complete, the cascade level is incremented (up
      to and including CL3) and the execution continues at step 5 to
      get the remaining bytes of NFCID1.

Once target detection is done, type 1 and 2 tag commands must be
handled by a user space application (i.e neard) through the NFC core.
Responses for type 1 tag are returned directly to user space via NFC
core.
Responses of type 2 commands are handled differently. The digital stack
doesn't analyse the type of commands sent through im_transceive() and
must differentiate valid responses from error ones.
The response process flow is as follow:

1 - If the response length is 16 bytes, it is a valid response of a
    READ command. the packet is returned to the NFC core through the
    callback passed to im_transceive(). Processing stops.
2 - If the response is 1 byte long and is a ACK byte (0x0A), it is a
    valid response of a WRITE command for example. First packet byte
    is set to 0 for no-error and passed back to the NFC core.
    Processing stops.
3 - Any other response is treated as an error and -EIO error code is
    returned to the NFC core through the response callback.

Moreover, since the driver can't differentiate success response from a
NACK response, the digital stack has to handle CRC calculation.

Thus, this patch also adds support for CRC calculation. If the driver
doesn't handle it, the digital stack will calculate CRC and will add it
to sent frames. CRC will also be checked and removed from received
frames. Pointers to the correct CRC calculation functions are stored in
the digital stack device structure when a target is detected. This
avoids the need to check the current target type for every call to
im_transceive() and for every response received from a peer device.

Signed-off-by: Thierry Escande &lt;thierry.escande@linux.intel.com&gt;
Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
</content>
</entry>
</feed>
