History log of /drivers/nfc/pn544/pn544.c
Revision Date Author Comments
971d63cff6d70ab09237b7718f39615e40ad0828 11-Dec-2013 Arron Wang <arron.wang@intel.com> NFC: pn544: Pass hardware variant information when downloading firmware

Different pn544 hardware variant may use different commands to download
new firmwares. The C2 does a regular firmware download while the C3 uses
a more secure protocol.
As a consequence we need to pass the hardware variant from the HCI SW
version command reply down to the pn544 i2c layer, in order to use the
right protocol at run time.

Signed-off-by: Arron Wang <arron.wang@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
34f7e57b231ec4fd943d0d172fb7c1bb143f1da8 15-Nov-2013 Arman Uguray <armansito@chromium.org> NFC: pn544: Refactor hw_config values

Some of the EEPROM configurations that are assigned by the PN544 driver
are set by the firmware and should not be modified by the driver. Others
are certain user mode configurations that are currently getting set to values
that shouldn't necessarily be dictated by the driver. This patch changes
most user and system mode configurations to the firmware defaults.

Signed-off-by: Arman Uguray <armansito@chromium.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
98b32decc83ed3137e3ddbc918b102f8fc406b6d 06-Dec-2013 Jeff Kirsher <jeffrey.t.kirsher@intel.com> nfc: Fix FSF address in file headers

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 <http://www.gnu.org/licenses/> so that we do not have to keep
updating the header comments anytime the address changes.

CC: linux-wireless@vger.kernel.org
CC: Lauro Ramos Venancio <lauro.venancio@openbossa.org>
CC: Aloisio Almeida Jr <aloisio.almeida@openbossa.org>
CC: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17936b43f0fdede23582d83a45622751409c99b9 05-Apr-2013 Joe Perches <joe@perches.com> NFC: Standardize logging style

Use standardized styles to minimize coding defects.

Always use nfc_<level> where feasible.
Add \n to formats where appropriate.
Typo "it it" correction.
Add #define pr_fmt where appropriate.
Remove function tracing logging messages.
Remove OOM messages.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
3943826177945c0f7e82fcf1f37797149c6d9c91 23-Aug-2013 Arron Wang <arron.wang@intel.com> NFC: pn544: Add SE enable/disable operation

To enable the UICC secure element, we first enable the UICC gate list in
order for the SE to be able to use all RF technologies.
For the embedded SE, we just turn the eSE default mode to ON.

Signed-off-by: Arron Wang <arron.wang@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
5faba2fdf9819ebebd6d1a1cef70fddb0518cd08 23-Aug-2013 Arron Wang <arron.wang@intel.com> NFC: pn544: Add SE discover operation

For the SWP secure element, we send the proprietary SELF_TEST_SWP
command and check the response.
For the WI secure element, we simply try to switch to the default
embedded SE mode. If that works, it means we have an embedded SE.

Signed-off-by: Arron Wang <arron.wang@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
8bd7fc89958c2f23a5c5d0113ff65713683041ea 19-Jul-2013 Eric Lapuyade <eric.lapuyade@linux.intel.com> NFC: pn544: Add firmware operations hci ops

The firmware operation callback is passed by the physical layer to the
hci driver during probe. All the driver does is to store it and call it
when the fw_upload hci ops is invoked.

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
eab10b71a7d62d7cc6db631dba448f1d84df9b53 19-Jul-2013 Eric Lapuyade <eric.lapuyade@linux.intel.com> NFC: pn544: i2c: Add firmware download mode power-on support

This is in preparation for pn544-i2c firmware download feature, where we
need to know if we're in regular or firmware upload mode.

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
0b456c418a5595b9d67f300c9ac6a2441e774603 07-May-2013 Samuel Ortiz <sameo@linux.intel.com> NFC: Remove the static supported_se field

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: Samuel Ortiz <sameo@linux.intel.com>
a69bdc1ecd032fda1bc808fa0e1634bbc9417ad5 22-Apr-2013 Arron Wang <arron.wang@intel.com> NFC: pn544: Remove Felica and Jewel device presence check

There is no builtin command for driver to check the presence of
Felica and Jewel device, it is more reasonable for the userspace
daemon neard to build seperate commands to check the presence of
the card.

Signed-off-by: Arron Wang <arron.wang@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
9c59844005c22700b36dcdbafeea7956b7f4b174 22-Apr-2013 Arron Wang <arron.wang@intel.com> NFC: pn544: Identify Type F NFC-DEP through NFCID2

NFCID2 is defined as the first 2 manufacturer ID (IDm) bytes.
NFC DEP (NFC peer to peer) devices Type-F NFCID2 must start with
0x01fe according to the NFC Digital Specification.
By checking those first 2 bytes we send the right command either to the
reader gate when NFCID2 != 0x1fe (The NFC tag case) or to the NFCIP1 gate
when seeing an NFC DEP device (The NFC peer to peer case).

Without this fix, Felica (Type F) tags are not properly detected with this
driver.

Signed-off-by: Arron Wang <arron.wang@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
390a1bd8538132186ddb679cafe9e75b7ef7e2d2 19-Dec-2012 Samuel Ortiz <sameo@linux.intel.com> NFC: Initial Secure Element API

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: Samuel Ortiz <sameo@linux.intel.com>
aa74103071312fede1f4953fe3c027941add1256 18-Dec-2012 Samuel Ortiz <sameo@linux.intel.com> NFC: pn544: Separate the core code and the i2c one into different modules

As we may need to support other physical layers, we can avoid linking the
core part into each and every pn544 module.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
bf71ab8ba53081c28b960d48e0c4cd1c17588aa6 18-Dec-2012 Eric Lapuyade <eric.lapuyade@linux.intel.com> NFC: Add HCI quirks to support driver (non)standard implementations

Some chips diverge from the HCI spec in their implementation of standard
features. This adds a new quirks parameter to
nfc_hci_allocate_device() to let the driver indicate its divergence.

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
924d4a023ee6da2e40c78578829e68bcbabee2dd 04-Dec-2012 Eric Lapuyade <eric.lapuyade@linux.intel.com> NFC: Fixed skb leak in tm_send() nfc and hci ops implementations

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
40d06d3647ea872a7346be1f6859f18cd0fe08d3 04-Dec-2012 Eric Lapuyade <eric.lapuyade@linux.intel.com> NFC: Changed event_received hci ops result semantic

Some chips use a standard HCI event code, destined to a proprietary
gate, with a different meaning. Therefore, the HCI driver must always
have a chance to intercept the event before standard processing is
attempted.
The new semantic specifies that the result value "1" means that the
driver doesn't especially handle the event. result <= 0 means it was
handled.

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
27c31191b3d7ff32c266a5dbea344b9aa96ebf14 28-Nov-2012 Eric Lapuyade <eric.lapuyade@linux.intel.com> NFC: Added error handling in event_received hci ops

There is no use to return an error if the caller doesn't get it.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
984d334f28c6a93231fe9de3ec42717469e90d4c 08-Oct-2012 Arron Wang <arron.wang@intel.com> NFC: Fix sparse warnings due to missing static

Signed-off-by: Arron Wang <arron.wang@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
97f18414af395c547f20300e5d4c81d7190a4155 02-Oct-2012 Eric Lapuyade <eric.lapuyade@linux.intel.com> NFC: Separate pn544 hci driver in HW dependant and independant parts

The driver now has all HCI stuff isolated in one file, and all the
hardware link specifics in another. Writing a pn544 driver on top of
another hardware link is now just a matter of adding a new file for that
new hardware specifics.

Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>