summaryrefslogtreecommitdiffstats
path: root/include/net/nfc/hci.h
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2014-10-14 01:42:23 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2015-06-09 01:20:19 +0200
commit8115dd5905318afcde713726064ec052b7d488cf (patch)
treeb4504be9f866bb932f3fe5e4f39b96b0f22f3674 /include/net/nfc/hci.h
parentNFC: st21nfcb: Configure CLF with NCI proprietary command (diff)
downloadlinux-8115dd5905318afcde713726064ec052b7d488cf.tar.xz
linux-8115dd5905318afcde713726064ec052b7d488cf.zip
NFC: Introduce vendor commands structures
Together with inline routines to associate a vendor commands array with an NFC device. Vendor commands allow vendors to implement their very specific operations from driver code instead of adding new stack ops for non NFC generic commands. Vendors need to select their own unique IDs and use that as a namespace for defining sub commands. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/net/nfc/hci.h')
-rw-r--r--include/net/nfc/hci.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/net/nfc/hci.h b/include/net/nfc/hci.h
index 020a814bc8ed..316694dafa5b 100644
--- a/include/net/nfc/hci.h
+++ b/include/net/nfc/hci.h
@@ -179,6 +179,13 @@ void nfc_hci_unregister_device(struct nfc_hci_dev *hdev);
void nfc_hci_set_clientdata(struct nfc_hci_dev *hdev, void *clientdata);
void *nfc_hci_get_clientdata(struct nfc_hci_dev *hdev);
+static inline int nfc_hci_set_vendor_cmds(struct nfc_hci_dev *hdev,
+ struct nfc_vendor_cmd *cmds,
+ int n_cmds)
+{
+ return nfc_set_vendor_cmds(hdev->ndev, cmds, n_cmds);
+}
+
void nfc_hci_driver_failure(struct nfc_hci_dev *hdev, int err);
int nfc_hci_result_to_errno(u8 result);