summaryrefslogtreecommitdiffstats
path: root/net/nfc/hci/shdlc.c
diff options
context:
space:
mode:
authorEric Lapuyade <eric.lapuyade@intel.com>2012-05-07 12:31:16 +0200
committerJohn W. Linville <linville@tuxdriver.com>2012-05-15 17:28:00 -0400
commit1676f75159c8091e865c33b61ad4934dfd3b7821 (patch)
treebabd0f9912f05a2608c4fab5084345d408c67169 /net/nfc/hci/shdlc.c
parentd4ccb132801aeeb2cfd18c4b4b7fa0043ab37f80 (diff)
downloadop-kernel-dev-1676f75159c8091e865c33b61ad4934dfd3b7821.zip
op-kernel-dev-1676f75159c8091e865c33b61ad4934dfd3b7821.tar.gz
NFC: Add HCI/SHDLC support to let driver check for tag presence
Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/nfc/hci/shdlc.c')
-rw-r--r--net/nfc/hci/shdlc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/net/nfc/hci/shdlc.c b/net/nfc/hci/shdlc.c
index 923bdf7..5665dc6d 100644
--- a/net/nfc/hci/shdlc.c
+++ b/net/nfc/hci/shdlc.c
@@ -816,6 +816,17 @@ static int nfc_shdlc_data_exchange(struct nfc_hci_dev *hdev,
return -EPERM;
}
+static int nfc_shdlc_check_presence(struct nfc_hci_dev *hdev,
+ struct nfc_target *target)
+{
+ struct nfc_shdlc *shdlc = nfc_hci_get_clientdata(hdev);
+
+ if (shdlc->ops->check_presence)
+ return shdlc->ops->check_presence(shdlc, target);
+
+ return 0;
+}
+
static struct nfc_hci_ops shdlc_ops = {
.open = nfc_shdlc_open,
.close = nfc_shdlc_close,
@@ -825,6 +836,7 @@ static struct nfc_hci_ops shdlc_ops = {
.target_from_gate = nfc_shdlc_target_from_gate,
.complete_target_discovered = nfc_shdlc_complete_target_discovered,
.data_exchange = nfc_shdlc_data_exchange,
+ .check_presence = nfc_shdlc_check_presence,
};
struct nfc_shdlc *nfc_shdlc_allocate(struct nfc_shdlc_ops *ops,
OpenPOWER on IntegriCloud