From: Christophe Ricard Date: Sun, 1 Feb 2015 21:26:15 +0000 (+0100) Subject: NFC: st21nfcb: Add support for secure element X-Git-Tag: omap-for-v4.1/prcm-dts-mfd-syscon-fix~134^2~31^2~10 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ae01f7967718ac9ed800a99964f88c0c8b07e11;p=pandora-kernel.git 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 Signed-off-by: Samuel Ortiz --- Reading git-diff-tree failed