aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nfc
diff options
context:
space:
mode:
authorMark A. Greer <mgreer@animalcreek.com>2014-03-25 11:54:32 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2014-04-21 18:37:27 -0400
commit4dd836e46c3ddcb2020646c867be589658440be0 (patch)
treedcf43b03c625a20c53610effcd727efe4b0d91eb /drivers/nfc
parentb887eb09d3cbda145d9fff4b9a56c384edd07ed7 (diff)
NFC: trf7970a: Reset FIFO when 'End of TX' Interrupt Occurs
Sometimes after sending a frame there is tx data leftover in the FIFO which the driver will think is part of the receive frame. That data can be cleared when an 'End of TX' interrupt is received by issuing the 'FIFO Reset' command. Signed-off-by: Mark A. Greer <mgreer@animalcreek.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc')
-rw-r--r--drivers/nfc/trf7970a.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/nfc/trf7970a.c b/drivers/nfc/trf7970a.c
index df634498c81b..a2e0a21d6ea2 100644
--- a/drivers/nfc/trf7970a.c
+++ b/drivers/nfc/trf7970a.c
@@ -681,7 +681,9 @@ static irqreturn_t trf7970a_irq(int irq, void *dev_id)
681 trf->ignore_timeout = 681 trf->ignore_timeout =
682 !cancel_delayed_work(&trf->timeout_work); 682 !cancel_delayed_work(&trf->timeout_work);
683 trf7970a_drain_fifo(trf, status); 683 trf7970a_drain_fifo(trf, status);
684 } else if (!(status & TRF7970A_IRQ_STATUS_TX)) { 684 } else if (status == TRF7970A_IRQ_STATUS_TX) {
685 trf7970a_cmd(trf, TRF7970A_CMD_FIFO_RESET);
686 } else {
685 trf7970a_send_err_upstream(trf, -EIO); 687 trf7970a_send_err_upstream(trf, -EIO);
686 } 688 }
687 break; 689 break;