diff options
author | Stephan Olbrich <stephanolbrich@gmx.de> | 2016-02-09 13:10:33 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-02-10 14:14:57 -0500 |
commit | f29ab1845f3e2684ba1c6de6c3bd5198e4b1459c (patch) | |
tree | 60f97c2597b0acaa3a7015ee15266f9aeae2d25d | |
parent | 0697ae80fe3ccaf7d443fa5522fa7eeea34c19bb (diff) |
spi: bcm2835aux: disable tx fifo empty irq
The tx empty irq can be disabled when all data was copied.
This prevents unnecessary interrupts while the last bytes are sent.
Signed-off-by: Stephan Olbrich <stephanolbrich@gmx.de>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | drivers/spi/spi-bcm2835aux.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/spi/spi-bcm2835aux.c b/drivers/spi/spi-bcm2835aux.c index 7de6f8472a81..e1b2fec1db63 100644 --- a/drivers/spi/spi-bcm2835aux.c +++ b/drivers/spi/spi-bcm2835aux.c | |||
@@ -212,6 +212,12 @@ static irqreturn_t bcm2835aux_spi_interrupt(int irq, void *dev_id) | |||
212 | ret = IRQ_HANDLED; | 212 | ret = IRQ_HANDLED; |
213 | } | 213 | } |
214 | 214 | ||
215 | if (!bs->tx_len) { | ||
216 | /* disable tx fifo empty interrupt */ | ||
217 | bcm2835aux_wr(bs, BCM2835_AUX_SPI_CNTL1, bs->cntl[1] | | ||
218 | BCM2835_AUX_SPI_CNTL1_IDLE); | ||
219 | } | ||
220 | |||
215 | /* and if rx_len is 0 then wake up completion and disable spi */ | 221 | /* and if rx_len is 0 then wake up completion and disable spi */ |
216 | if (!bs->rx_len) { | 222 | if (!bs->rx_len) { |
217 | bcm2835aux_spi_reset_hw(bs); | 223 | bcm2835aux_spi_reset_hw(bs); |