Skip to content

Commit

Permalink
NFC: nfcmrvl: avoid UART break control during FW download
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vincent Cuissard authored and Samuel Ortiz committed Nov 4, 2015
1 parent 1dbac5c commit feacf00
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions drivers/nfc/nfcmrvl/uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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);
Expand All @@ -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
Expand Down

0 comments on commit feacf00

Please sign in to comment.