summaryrefslogtreecommitdiffstats
path: root/drivers/nfc
diff options
context:
space:
mode:
authorVincent Cuissard <cuissard@marvell.com>2015-11-03 19:19:32 +0100
committerSamuel Ortiz <sameo@linux.intel.com>2015-11-05 00:32:25 +0100
commitfeacf0024bfea807d7302d4aff83b391ac6e4077 (patch)
treeb03a22b836bb20150ff2f1d04eee3b1406480da6 /drivers/nfc
parent1dbac5c578ead0d0f20a06b036d19c109a5a4fb9 (diff)
downloadop-kernel-dev-feacf0024bfea807d7302d4aff83b391ac6e4077.zip
op-kernel-dev-feacf0024bfea807d7302d4aff83b391ac6e4077.tar.gz
NFC: nfcmrvl: avoid UART break control during FW download
BootROM does not support any form of power management during FW download. On UART, the driver shall not try to send breaks. Signed-off-by: Vincent Cuissard <cuissard@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc')
-rw-r--r--drivers/nfc/nfcmrvl/uart.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/nfc/nfcmrvl/uart.c b/drivers/nfc/nfcmrvl/uart.c
index f3d041c..b33249b 100644
--- a/drivers/nfc/nfcmrvl/uart.c
+++ b/drivers/nfc/nfcmrvl/uart.c
@@ -152,10 +152,6 @@ static int nfcmrvl_nci_uart_open(struct nci_uart *nu)
nu->drv_data = priv;
nu->ndev = priv->ndev;
- /* Set BREAK */
- if (priv->config.break_control && nu->tty->ops->break_ctl)
- nu->tty->ops->break_ctl(nu->tty, -1);
-
return 0;
}
@@ -174,6 +170,9 @@ static void nfcmrvl_nci_uart_tx_start(struct nci_uart *nu)
{
struct nfcmrvl_private *priv = (struct nfcmrvl_private *)nu->drv_data;
+ if (priv->ndev->nfc_dev->fw_download_in_progress)
+ return;
+
/* Remove BREAK to wake up the NFCC */
if (priv->config.break_control && nu->tty->ops->break_ctl) {
nu->tty->ops->break_ctl(nu->tty, 0);
@@ -185,6 +184,9 @@ static void nfcmrvl_nci_uart_tx_done(struct nci_uart *nu)
{
struct nfcmrvl_private *priv = (struct nfcmrvl_private *)nu->drv_data;
+ if (priv->ndev->nfc_dev->fw_download_in_progress)
+ return;
+
/*
** To ensure that if the NFCC goes in DEEP SLEEP sate we can wake him
** up. we set BREAK. Once we will be ready to send again we will remove
OpenPOWER on IntegriCloud