diff options
author | Eric Lapuyade <eric.lapuyade@intel.com> | 2012-05-07 14:31:16 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-05-16 01:28:00 +0400 |
commit | 1676f75159c8091e865c33b61ad4934dfd3b7821 (patch) | |
tree | babd0f9912f05a2608c4fab5084345d408c67169 /net/nfc/hci/core.c | |
parent | d4ccb132801aeeb2cfd18c4b4b7fa0043ab37f80 (diff) | |
download | linux-1676f75159c8091e865c33b61ad4934dfd3b7821.tar.xz |
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/core.c')
-rw-r--r-- | net/nfc/hci/core.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/net/nfc/hci/core.c b/net/nfc/hci/core.c index ef5cd5c9e3fb..f7e4f5ae4559 100644 --- a/net/nfc/hci/core.c +++ b/net/nfc/hci/core.c @@ -574,6 +574,17 @@ static int hci_data_exchange(struct nfc_dev *nfc_dev, struct nfc_target *target, return 0; } +static int hci_check_presence(struct nfc_dev *nfc_dev, + struct nfc_target *target) +{ + struct nfc_hci_dev *hdev = nfc_get_drvdata(nfc_dev); + + if (hdev->ops->check_presence) + return hdev->ops->check_presence(hdev, target); + + return 0; +} + struct nfc_ops hci_nfc_ops = { .dev_up = hci_dev_up, .dev_down = hci_dev_down, @@ -582,6 +593,7 @@ struct nfc_ops hci_nfc_ops = { .activate_target = hci_activate_target, .deactivate_target = hci_deactivate_target, .data_exchange = hci_data_exchange, + .check_presence = hci_check_presence, }; struct nfc_hci_dev *nfc_hci_allocate_device(struct nfc_hci_ops *ops, |