aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nfc
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2012-12-19 13:11:32 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2013-01-09 18:51:54 -0500
commit390a1bd8538132186ddb679cafe9e75b7ef7e2d2 (patch)
tree1c548396163a30e0e29f6572cf7b6f0c645085ba /drivers/nfc
parent2ad554a502facd705ce6eb362d0f1ac3ca426508 (diff)
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>
Diffstat (limited to 'drivers/nfc')
-rw-r--r--drivers/nfc/nfcwilink.c1
-rw-r--r--drivers/nfc/pn533.c1
-rw-r--r--drivers/nfc/pn544/pn544.c6
3 files changed, 6 insertions, 2 deletions
diff --git a/drivers/nfc/nfcwilink.c b/drivers/nfc/nfcwilink.c
index c7c182d2b7df..3b731acbc408 100644
--- a/drivers/nfc/nfcwilink.c
+++ b/drivers/nfc/nfcwilink.c
@@ -542,6 +542,7 @@ static int nfcwilink_probe(struct platform_device *pdev)
542 542
543 drv->ndev = nci_allocate_device(&nfcwilink_ops, 543 drv->ndev = nci_allocate_device(&nfcwilink_ops,
544 protocols, 544 protocols,
545 NFC_SE_NONE,
545 NFCWILINK_HDR_LEN, 546 NFCWILINK_HDR_LEN,
546 0); 547 0);
547 if (!drv->ndev) { 548 if (!drv->ndev) {
diff --git a/drivers/nfc/pn533.c b/drivers/nfc/pn533.c
index e8c083203b33..31a5b3b53b2a 100644
--- a/drivers/nfc/pn533.c
+++ b/drivers/nfc/pn533.c
@@ -2525,6 +2525,7 @@ static int pn533_probe(struct usb_interface *interface,
2525 2525
2526 2526
2527 dev->nfc_dev = nfc_allocate_device(&pn533_nfc_ops, protocols, 2527 dev->nfc_dev = nfc_allocate_device(&pn533_nfc_ops, protocols,
2528 NFC_SE_NONE,
2528 dev->ops->tx_header_len + 2529 dev->ops->tx_header_len +
2529 PN533_CMD_DATAEXCH_HEAD_LEN, 2530 PN533_CMD_DATAEXCH_HEAD_LEN,
2530 dev->ops->tx_tail_len); 2531 dev->ops->tx_tail_len);
diff --git a/drivers/nfc/pn544/pn544.c b/drivers/nfc/pn544/pn544.c
index d108c794008d..9c5f16e7baef 100644
--- a/drivers/nfc/pn544/pn544.c
+++ b/drivers/nfc/pn544/pn544.c
@@ -801,7 +801,7 @@ int pn544_hci_probe(void *phy_id, struct nfc_phy_ops *phy_ops, char *llc_name,
801 struct nfc_hci_dev **hdev) 801 struct nfc_hci_dev **hdev)
802{ 802{
803 struct pn544_hci_info *info; 803 struct pn544_hci_info *info;
804 u32 protocols; 804 u32 protocols, se;
805 struct nfc_hci_init_data init_data; 805 struct nfc_hci_init_data init_data;
806 int r; 806 int r;
807 807
@@ -834,8 +834,10 @@ int pn544_hci_probe(void *phy_id, struct nfc_phy_ops *phy_ops, char *llc_name,
834 NFC_PROTO_ISO14443_B_MASK | 834 NFC_PROTO_ISO14443_B_MASK |
835 NFC_PROTO_NFC_DEP_MASK; 835 NFC_PROTO_NFC_DEP_MASK;
836 836
837 se = NFC_SE_UICC | NFC_SE_EMBEDDED;
838
837 info->hdev = nfc_hci_allocate_device(&pn544_hci_ops, &init_data, 0, 839 info->hdev = nfc_hci_allocate_device(&pn544_hci_ops, &init_data, 0,
838 protocols, llc_name, 840 protocols, se, llc_name,
839 phy_headroom + PN544_CMDS_HEADROOM, 841 phy_headroom + PN544_CMDS_HEADROOM,
840 phy_tailroom, phy_payload); 842 phy_tailroom, phy_payload);
841 if (!info->hdev) { 843 if (!info->hdev) {