aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nfc/nfcmrvl/nfcmrvl.h
diff options
context:
space:
mode:
authorVincent Cuissard <cuissard@marvell.com>2015-06-11 11:25:46 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2015-06-11 23:25:21 +0200
commit4a2b947f56b33cde68d6e0543160ea09ce651fd9 (patch)
tree5bd042492e6be12b7d9d8320012bb414b0d339fb /drivers/nfc/nfcmrvl/nfcmrvl.h
parentNFC: nfcmrvl: update USB device id (diff)
downloadlinux-dev-4a2b947f56b33cde68d6e0543160ea09ce651fd9.tar.xz
linux-dev-4a2b947f56b33cde68d6e0543160ea09ce651fd9.zip
NFC: nfcmrvl: add chip reset management
Low level driver can specify a GPIO that will be used to reset the chip. Thanks to this the driver can ensure the state of the device at init. 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.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/nfc/nfcmrvl/nfcmrvl.h b/drivers/nfc/nfcmrvl/nfcmrvl.h
index 7a10dabaf1b2..2edae9a4b6bd 100644
--- a/drivers/nfc/nfcmrvl/nfcmrvl.h
+++ b/drivers/nfc/nfcmrvl/nfcmrvl.h
@@ -39,12 +39,18 @@
#define NFCMRVL_HCI_OCF 0xFE
#define NFCMRVL_DEV_FLAG_HCI_MUXED (1 << 0)
+#define NFCMRVL_DEV_FLAG_SET_RESET_N_IO(X) ((X) << 16)
+#define NFCMRVL_DEV_FLAG_GET_RESET_N_IO(X) ((X) >> 16)
struct nfcmrvl_private {
/* Tell if NCI packets are encapsulated in HCI ones */
int hci_muxed;
struct nci_dev *ndev;
+
+ /* Reset IO (0 if not available) */
+ int reset_n_io;
+
unsigned long flags;
void *drv_data;
struct device *dev;
@@ -63,3 +69,5 @@ struct nfcmrvl_private *nfcmrvl_nci_register_dev(void *drv_data,
struct nfcmrvl_if_ops *ops,
struct device *dev,
unsigned int flags);
+
+void nfcmrvl_chip_reset(struct nfcmrvl_private *priv);