linux/drivers/nfc
Christophe Ricard 2130fb97fe NFC: st21nfca: Adding support for secure element
st21nfca has 1 physical SWP line and can support up to 2 secure elements
(UICC & eSE) thanks to an external switch managed with a gpio.

The platform integrator needs to specify thanks to 2 initialization
properties, uicc-present and ese-present, if it is suppose to have uicc
and/or ese. Of course if the platform does not have an external switch,
only one kind of secure element can be supported. Those parameters are
under platform integrator responsibilities.

During initialization, the white_list will be set according to those
parameters.

The discovery_se function will assume a secure element is physically
present according to uicc-present and ese-present values and will add it
to the secure element list. On ese activation, the atr is retrieved to
calculate a command exchange timeout based on the first atr(TB) value.

The se_io will allow to transfer data over SWP. 2 kind of events may appear
after a data is sent over:
- ST21NFCA_EVT_TRANSMIT_DATA when receiving an apdu answer
- ST21NFCA_EVT_WTX_REQUEST when the secure element needs more time than
expected to compute a command. If this timeout expired, a first recovery
tentative consist to send a simple software reset proprietary command.
If this tentative still fail, a second recovery tentative consist to send
a hardware reset proprietary command.
This function is only relevant for eSE like secure element.

This patch also change the way a pipe is referenced. There can be
different pipe connected to the same gate with different host destination
(ex: CONNECTIVITY). In order to keep host information every pipe are
reference with a tuple (gate, host). In order to reduce changes, we are
keeping unchanged the way a gate is addressed on the Terminal Host.
However, this is working because we consider the apdu reader gate is only
present on the eSE slot also the connectivity gate cannot give a reliable
value; it will give the latest stored pipe value.

Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2015-01-28 00:03:36 +01:00
..
microread NFC: microread: Change event_received gate parameter to pipe 2015-01-28 00:03:35 +01:00
nfcmrvl NFC: nfcmrvl: Fix possible memory leak issue 2014-01-09 01:27:20 +01:00
pn544 NFC: pn544: Change event_received gate parameter to pipe 2015-01-28 00:03:35 +01:00
st21nfca NFC: st21nfca: Adding support for secure element 2015-01-28 00:03:36 +01:00
st21nfcb NFC: st21nfcb: Fix "NULL pointer dereference" possible error 2015-01-26 23:14:34 +01:00
Kconfig NFC: st21nfcb: Add driver for STMicroelectronics ST21NFCB NFC chip 2014-07-23 00:49:28 +02:00
Makefile NFC: st21nfcb: Add driver for STMicroelectronics ST21NFCB NFC chip 2014-07-23 00:49:28 +02:00
mei_phy.c NFC: mei_phy: Using kfree_skb() instead of kfree() 2014-01-04 03:32:26 +01:00
mei_phy.h NFC: mei: Add a common mei bus API for NFC drivers 2013-04-16 00:39:31 +02:00
nfcsim.c NFC: Convert nfc_dev_info and nfc_dev_err to nfc_<level> 2013-09-25 01:35:39 +02:00
nfcwilink.c nfc: drop owner assignment from platform_drivers 2014-10-20 16:21:19 +02:00
pn533.c NFC: pn533: Convert to use USB_DEVICE macro 2014-02-23 23:32:18 +01:00
port100.c NFC: port100: Add support for type 4B tag 2014-05-26 00:42:02 +02:00
trf7970a.c NFC / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM 2014-12-15 15:12:21 +01:00