aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nfc/nfcmrvl/nfcmrvl.h
diff options
context:
space:
mode:
authorVincent Cuissard <cuissard@marvell.com>2015-10-26 10:27:39 +0100
committerSamuel Ortiz <sameo@linux.intel.com>2015-10-27 04:18:44 +0100
commit3194c6870158e305dac2af52f83681e9cb67280f (patch)
treeb4fc6cbfbd419132051f3a06d67c5d827a5d6e5a /drivers/nfc/nfcmrvl/nfcmrvl.h
parentNFC: NCI: export nci_send_frame and nci_send_cmd function (diff)
downloadlinux-dev-3194c6870158e305dac2af52f83681e9cb67280f.tar.xz
linux-dev-3194c6870158e305dac2af52f83681e9cb67280f.zip
NFC: nfcmrvl: add firmware download support
Implement firmware download protocol for Marvell NFC controllers. This protocol is based on NCI frames that's why parts of its implementation use some NCI generic functions. 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, 17 insertions, 2 deletions
diff --git a/drivers/nfc/nfcmrvl/nfcmrvl.h b/drivers/nfc/nfcmrvl/nfcmrvl.h
index e5a7e5464f2e..1b30f043139c 100644
--- a/drivers/nfc/nfcmrvl/nfcmrvl.h
+++ b/drivers/nfc/nfcmrvl/nfcmrvl.h
@@ -1,7 +1,7 @@
/**
* Marvell NFC driver
*
- * Copyright (C) 2014, Marvell International Ltd.
+ * Copyright (C) 2014-2015, Marvell International Ltd.
*
* This software file (the "File") is distributed by Marvell International
* Ltd. under the terms of the GNU General Public License Version 2, June 1991
@@ -21,6 +21,8 @@
#include <linux/platform_data/nfcmrvl.h>
+#include "fw_dnld.h"
+
/* Define private flags: */
#define NFCMRVL_NCI_RUNNING 1
@@ -37,6 +39,8 @@
*/
#define NFCMRVL_PB_BAIL_OUT 0x11
+#define NFCMRVL_PROP_REF_CLOCK 0xF0
+#define NFCMRVL_PROP_SET_HI_CONFIG 0xF1
/*
** HCI defines
@@ -52,9 +56,10 @@
enum nfcmrvl_phy {
NFCMRVL_PHY_USB = 0,
NFCMRVL_PHY_UART = 1,
+ NFCMRVL_PHY_I2C = 2,
+ NFCMRVL_PHY_SPI = 3,
};
-
struct nfcmrvl_private {
unsigned long flags;
@@ -62,8 +67,15 @@ struct nfcmrvl_private {
/* Platform configuration */
struct nfcmrvl_platform_data config;
+ /* Parent dev */
struct nci_dev *ndev;
+ /* FW download context */
+ struct nfcmrvl_fw_dnld fw_dnld;
+
+ /* FW download support */
+ bool support_fw_dnld;
+
/*
** PHY related information
*/
@@ -82,6 +94,8 @@ struct nfcmrvl_if_ops {
int (*nci_open) (struct nfcmrvl_private *priv);
int (*nci_close) (struct nfcmrvl_private *priv);
int (*nci_send) (struct nfcmrvl_private *priv, struct sk_buff *skb);
+ void (*nci_update_config)(struct nfcmrvl_private *priv,
+ const void *param);
};
void nfcmrvl_nci_unregister_dev(struct nfcmrvl_private *priv);
@@ -93,6 +107,7 @@ struct nfcmrvl_private *nfcmrvl_nci_register_dev(void *drv_data,
void nfcmrvl_chip_reset(struct nfcmrvl_private *priv);
+void nfcmrvl_chip_halt(struct nfcmrvl_private *priv);
int nfcmrvl_parse_dt(struct device_node *node,
struct nfcmrvl_platform_data *pdata);