summaryrefslogtreecommitdiffstats
path: root/drivers/nfc/st21nfcb/st21nfcb.h
diff options
context:
space:
mode:
authorChristophe Ricard <christophe.ricard@gmail.com>2015-02-01 22:26:15 +0100
committerSamuel Ortiz <sameo@linux.intel.com>2015-02-02 21:50:40 +0100
commit8ae01f7967718ac9ed800a99964f88c0c8b07e11 (patch)
treeb3eecaca807410f2a5f547ea9fcb551375b89163 /drivers/nfc/st21nfcb/st21nfcb.h
parent11f54f228643d0248ec00ce8c9fb8d872f87e7b8 (diff)
downloadtalos-op-linux-8ae01f7967718ac9ed800a99964f88c0c8b07e11.tar.gz
talos-op-linux-8ae01f7967718ac9ed800a99964f88c0c8b07e11.zip
NFC: st21nfcb: Add support for secure element
The st21nfcb chipset has 3 SWP (Single Wire Protocol) lines and supports up to 3 secure elements (UICC/eSE and µSD in the future). Some st21nfcb firmware does not support the nci command nci_nfcee_mode_set(NCI_NFCEE_DISABLE). For this reason, we assume 2 secures elements are always present (UICC and eSE). They will be added to the SE list once successfully activated and they will be available only after running through enable_se handler or when the poll in listen mode is started. During initialization, the white_list will be always set assuming both UICC & eSE are present. On eSE activation, the ATR bytes are fetched to build the command exchange timeout. The se_io hook will allow to transfer data over SWP. 2 kind of events may appear data is sent over: - ST21NFCB_EVT_TRANSMIT_DATA when receiving an apdu answer - ST21NFCB_EVT_WTX_REQUEST when the secure element needs more time than expected to process a command. If this timeout expires, we send a software reset, and then a hardware one if it still fails. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc/st21nfcb/st21nfcb.h')
-rw-r--r--drivers/nfc/st21nfcb/st21nfcb.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/nfc/st21nfcb/st21nfcb.h b/drivers/nfc/st21nfcb/st21nfcb.h
index ea58a56ad794..5ef8a58c9839 100644
--- a/drivers/nfc/st21nfcb/st21nfcb.h
+++ b/drivers/nfc/st21nfcb/st21nfcb.h
@@ -19,6 +19,7 @@
#ifndef __LOCAL_ST21NFCB_H_
#define __LOCAL_ST21NFCB_H_
+#include "st21nfcb_se.h"
#include "ndlc.h"
/* Define private flags: */
@@ -27,6 +28,7 @@
struct st21nfcb_nci_info {
struct llt_ndlc *ndlc;
unsigned long flags;
+ struct st21nfcb_se_info se_info;
};
void st21nfcb_nci_remove(struct nci_dev *ndev);
OpenPOWER on IntegriCloud