Skip to content

Commit aed503c

Browse files
msperlpopcornmix
authored andcommitted
spi: bcm2835: enable shared interrupt support
Add shared interrupt support for this driver. Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
1 parent aa94cc8 commit aed503c

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎drivers/spi/spi-bcm2835.c‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,10 @@ static irqreturn_t bcm2835_spi_interrupt(int irq, void *dev_id)
384384
if (bs->tx_len && cs & BCM2835_SPI_CS_DONE)
385385
bcm2835_wr_fifo_blind(bs, BCM2835_SPI_FIFO_SIZE);
386386

387+
/* check if we got interrupt enabled */
388+
if (!(bcm2835_rd(bs, BCM2835_SPI_CS) & BCM2835_SPI_CS_INTR))
389+
return IRQ_NONE;
390+
387391
/* Read as many bytes as possible from FIFO */
388392
bcm2835_rd_fifo(bs);
389393
/* Write as many bytes as possible to FIFO */
@@ -1365,7 +1369,8 @@ static int bcm2835_spi_probe(struct platform_device *pdev)
13651369
bcm2835_wr(bs, BCM2835_SPI_CS,
13661370
BCM2835_SPI_CS_CLEAR_RX | BCM2835_SPI_CS_CLEAR_TX);
13671371

1368-
err = devm_request_irq(&pdev->dev, bs->irq, bcm2835_spi_interrupt, 0,
1372+
err = devm_request_irq(&pdev->dev, bs->irq, bcm2835_spi_interrupt,
1373+
IRQF_SHARED,
13691374
dev_name(&pdev->dev), bs);
13701375
if (err) {
13711376
dev_err(&pdev->dev, "could not request IRQ: %d\n", err);

0 commit comments

Comments
 (0)