Skip to content

Commit f29ab18

Browse files
Stephan Olbrichbroonie
authored andcommitted
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>
1 parent 0697ae8 commit f29ab18

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/spi/spi-bcm2835aux.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,12 @@ static irqreturn_t bcm2835aux_spi_interrupt(int irq, void *dev_id)
212212
ret = IRQ_HANDLED;
213213
}
214214

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+
215221
/* and if rx_len is 0 then wake up completion and disable spi */
216222
if (!bs->rx_len) {
217223
bcm2835aux_spi_reset_hw(bs);

0 commit comments

Comments
 (0)