summaryrefslogtreecommitdiff
path: root/drivers/nfc/st-nci/st-nci.h
diff options
context:
space:
mode:
authorChristophe Ricard <christophe.ricard@gmail.com>2015-10-26 00:54:39 +0300
committerSamuel Ortiz <sameo@linux.intel.com>2015-10-27 05:55:10 +0300
commit3648dc6d27f648b8e3ce9b48874627a833d53c3a (patch)
tree196aee67d701a3856d0ca3bfed0d43f1de20d0c6 /drivers/nfc/st-nci/st-nci.h
parentbe73c2cbc857a4a3424c0e3cdd70002d5a27a756 (diff)
downloadlinux-3648dc6d27f648b8e3ce9b48874627a833d53c3a.tar.xz
NFC: st-nci: Add ese-present/uicc-present dts properties
In order to align with st21nfca, dts configuration properties ese_present and uicc_present are made available in st-nci driver. So far, in early development firmware, because nci_nfcee_mode_set(DISABLE) was not supported we had to try to enable it during the secure element discovery phase. After several trials on commercial and qualified firmware it appears that nci_nfcee_mode_set(ENABLE) and nci_nfcee_mode_set(DISABLE) are properly supported. Such feature also help us to eventually save some time (~5ms) when only one secure element is connected. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc/st-nci/st-nci.h')
-rw-r--r--drivers/nfc/st-nci/st-nci.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/nfc/st-nci/st-nci.h b/drivers/nfc/st-nci/st-nci.h
index 9c9bb19cc9ff..8b9f77b0249c 100644
--- a/drivers/nfc/st-nci/st-nci.h
+++ b/drivers/nfc/st-nci/st-nci.h
@@ -48,7 +48,13 @@ struct nci_mode_set_rsp {
u8 status;
} __packed;
+struct st_nci_se_status {
+ bool is_ese_present;
+ bool is_uicc_present;
+};
+
struct st_nci_se_info {
+ struct st_nci_se_status *se_status;
u8 atr[ST_NCI_ESE_MAX_LENGTH];
struct completion req_completion;
@@ -126,15 +132,16 @@ struct st_nci_vendor_info {
struct st_nci_info {
struct llt_ndlc *ndlc;
unsigned long flags;
+
struct st_nci_se_info se_info;
struct st_nci_vendor_info vendor_info;
};
void st_nci_remove(struct nci_dev *ndev);
int st_nci_probe(struct llt_ndlc *ndlc, int phy_headroom,
- int phy_tailroom);
+ int phy_tailroom, struct st_nci_se_status *se_status);
-int st_nci_se_init(struct nci_dev *ndev);
+int st_nci_se_init(struct nci_dev *ndev, struct st_nci_se_status *se_status);
void st_nci_se_deinit(struct nci_dev *ndev);
int st_nci_discover_se(struct nci_dev *ndev);
@@ -150,7 +157,7 @@ void st_nci_hci_cmd_received(struct nci_dev *ndev, u8 pipe, u8 cmd,
struct sk_buff *skb);
void st_nci_hci_loopback_event_received(struct nci_dev *ndev, u8 event,
- struct sk_buff *skb);
+ struct sk_buff *skb);
int st_nci_vendor_cmds_init(struct nci_dev *ndev);
#endif /* __LOCAL_ST_NCI_H_ */