summaryrefslogtreecommitdiff
path: root/drivers/nfc/nfcmrvl/nfcmrvl.h
diff options
context:
space:
mode:
authorVincent Cuissard <cuissard@marvell.com>2015-06-11 12:25:43 +0300
committerSamuel Ortiz <sameo@linux.intel.com>2015-06-12 00:24:09 +0300
commitf1f1a7da2b3853bf55ee5aab47c8916454b65fa8 (patch)
treedc506c43af42e2ce525ebbe26f8cda7fb8659acd /drivers/nfc/nfcmrvl/nfcmrvl.h
parentd18ee5a5b0926f1a5f6969e9207d9c4f99533f9b (diff)
downloadlinux-f1f1a7da2b3853bf55ee5aab47c8916454b65fa8.tar.xz
NFC: nfcmrvl: add support of HCI-based transport
In some configuration NCI packet can be encapsulated in HCI packets. This patch had the support of this. Signed-off-by: Vincent Cuissard <cuissard@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc/nfcmrvl/nfcmrvl.h')
-rw-r--r--drivers/nfc/nfcmrvl/nfcmrvl.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/nfc/nfcmrvl/nfcmrvl.h b/drivers/nfc/nfcmrvl/nfcmrvl.h
index 54c4a956bd45..b04cddd57388 100644
--- a/drivers/nfc/nfcmrvl/nfcmrvl.h
+++ b/drivers/nfc/nfcmrvl/nfcmrvl.h
@@ -27,7 +27,23 @@
#define NFCMRVL_GPIO_PIN_NFC_ACTIVE 0xB
#define NFCMRVL_NCI_MAX_EVENT_SIZE 260
+/*
+** HCI defines
+*/
+
+#define NFCMRVL_HCI_EVENT_HEADER_SIZE 0x04
+#define NFCMRVL_HCI_EVENT_CODE 0x04
+#define NFCMRVL_HCI_NFC_EVENT_CODE 0xFF
+#define NFCMRVL_HCI_COMMAND_CODE 0x01
+#define NFCMRVL_HCI_OGF 0x81
+#define NFCMRVL_HCI_OCF 0xFE
+
+#define NFCMRVL_DEV_FLAG_HCI_MUXED (1 << 0)
+
struct nfcmrvl_private {
+
+ /* Tell if NCI packets are encapsulated in HCI ones */
+ int hci_muxed;
struct nci_dev *ndev;
unsigned long flags;
void *drv_data;
@@ -45,4 +61,5 @@ void nfcmrvl_nci_unregister_dev(struct nfcmrvl_private *priv);
int nfcmrvl_nci_recv_frame(struct nfcmrvl_private *priv, void *data, int count);
struct nfcmrvl_private *nfcmrvl_nci_register_dev(void *drv_data,
struct nfcmrvl_if_ops *ops,
- struct device *dev);
+ struct device *dev,
+ unsigned int flags);