summaryrefslogtreecommitdiff
path: root/drivers/nfc/nq-nci.h
diff options
context:
space:
mode:
authorGaurav Singhal <gsinghal@codeaurora.org>2016-05-05 13:08:19 +0530
committerJeevan Shriram <jshriram@codeaurora.org>2016-05-18 13:37:18 -0700
commitc9f8e5943e6b50384d9bc8e4fc1b19c98e0c7a91 (patch)
treec439496adc52e871af94d989291132eb9d464a84 /drivers/nfc/nq-nci.h
parentef13a52535f7d768ace70d3d725ee19addf59931 (diff)
NFC: Add snapshot of NQxxx NFC driver
Add the latest version of NQxxx NFC driver from msm-3.18. This change is a combination of following changes: 1) NFC: add NQxxxx driver commit <356203701b7fd61b2d9776fac4fac6427735248b> 2) NFC: change reset and read flow commit <7620346454865b81d7086167d531aea7bb716926> 3) NFC: Enable DMA and CLK_REQ gpio config issue fix commit <150dbf117709b5677f86e5ced86b468731019b8b> 4) NFC: Fix function descriptions commit <c0248d70200c8e09a983758750632b7a75e422d3> 5) nq-nci: enable NFCC hardware check and clock to NQxx commit <2a92c1d6135f2d1e8fe3f2afcd290a2b1311a5a2> 6) nq-nci: XO shut down issue fix commit <8938151d4650fca6d42efdbce138aea9bad7eca0> 7) NFC: Remove sleep from irq handler commit <8ea2c805108cbf59b8e2abf87ee207fbf08fad97> 8) NFC: Remove DMA allocation and stack use in write commit <c1552090e4c46e1eeca756d0a7b4427f94eab0c3> CRs-Fixed: 890678, 892310, 955860, 968399, 993292 Change-Id: Ibb861ebdc63d45699369e23c077589d37e024b5e Signed-off-by: Gaurav Singhal <gsinghal@codeaurora.org>
Diffstat (limited to 'drivers/nfc/nq-nci.h')
-rw-r--r--drivers/nfc/nq-nci.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/drivers/nfc/nq-nci.h b/drivers/nfc/nq-nci.h
new file mode 100644
index 000000000000..e9f4de0aee3a
--- /dev/null
+++ b/drivers/nfc/nq-nci.h
@@ -0,0 +1,44 @@
+/* Copyright (c) 2016, The Linux Foundation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __NQ_NCI_H
+#define __NQ_NCI_H
+
+#include <linux/i2c.h>
+#include <linux/types.h>
+#include <linux/version.h>
+
+#include <linux/semaphore.h>
+#include <linux/completion.h>
+
+#include <linux/ioctl.h>
+#include <linux/miscdevice.h>
+
+#define NFC_SET_PWR _IOW(0xE9, 0x01, unsigned int)
+#define NFC_CLK_REQ _IOW(0xE9, 0x02, unsigned int)
+#define SET_RX_BLOCK _IOW(0xE9, 0x04, unsigned int)
+#define SET_EMULATOR_TEST_POINT _IOW(0xE9, 0x05, unsigned int)
+#define NFCC_INITIAL_CORE_RESET_NTF _IOW(0xE9, 0x10, unsigned int)
+
+#define NFC_RX_BUFFER_CNT_START (0x0)
+#define PAYLOAD_HEADER_LENGTH (0x3)
+#define PAYLOAD_LENGTH_MAX (256)
+#define BYTE (0x8)
+#define NCI_IDENTIFIER (0x10)
+
+enum nfcc_initial_core_reset_ntf {
+ TIMEDOUT_INITIAL_CORE_RESET_NTF = 0, /* 0*/
+ ARRIVED_INITIAL_CORE_RESET_NTF, /* 1 */
+ DEFAULT_INITIAL_CORE_RESET_NTF, /*2*/
+};
+
+#endif