Skip to contentSkip to conversation

spi: bcm2835aux: change initialization order and switch to platform_get_irq

PATCH In review kernel at martin.sperl.org 3 participants 3 messages Oct 15, 2015 – Oct 21, 2015 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spi: bcm2835aux: change initialization order and switch to platform_get_irq

From: Martin Sperl <[email protected]>

Change the initialization order of the HW so that the interrupt is only requested after the HW is initialized

Also the use of irq_of_parse_and_map is replaced by platform_get_irq.

---
 drivers/spi/spi-bcm2835aux.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/spi/spi-bcm2835aux.c +4 -4
index f92b4a6..1a1b58c 100644
@@ -410,7 +410,7 @@ static int bcm2835aux_spi_probe(struct platform_device *pdev)
 		goto out_master_put;
 	}
 
-	bs->irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
+	bs->irq = platform_get_irq(pdev, 0);
 	if (bs->irq <= 0) {
 		dev_err(&pdev->dev, "could not get IRQ: %d\n", bs->irq);
 		err = bs->irq ? bs->irq : -ENODEV;
@@ -432,6 +432,9 @@ static int bcm2835aux_spi_probe(struct platform_device *pdev)
 		goto out_clk_disable;
 	}
 
+	/* reset SPI-HW block */
+	bcm2835aux_spi_reset_hw(bs);
+
 	err = devm_request_irq(&pdev->dev, bs->irq,
 			       bcm2835aux_spi_interrupt,
 			       IRQF_SHARED,
@@ -441,9 +444,6 @@ static int bcm2835aux_spi_probe(struct platform_device *pdev)
 		goto out_clk_disable;
 	}
 
-	/* reset SPI-HW block */
-	bcm2835aux_spi_reset_hw(bs);
-
 	err = devm_spi_register_master(&pdev->dev, master);
 	if (err) {
 		dev_err(&pdev->dev, "could not register SPI master: %d\n", err);
Signature · 1 line
1.7.10.4

A message that is not in the archive (sent off-list or not yet received): 1444903820-9223-1-git-send-email-kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org

#2 lore raw

Applied "spi: bcm2835aux: change initialization order and switch to platform_get_irq" to the spi tree

The patch

spi: bcm2835aux: change initialization order and switch to platform_get_irq

has been applied to the spi tree at

git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

Quoted 1 line

From 07bce09e11f5007635d7f9e6bc55679dd6ed18bd Mon Sep 17 00:00:00 2001

From: Martin Sperl <[email protected]>
Date: Thu, 15 Oct 2015 10:10:20 +0000
Subject: [PATCH] spi: bcm2835aux: change initialization order and switch to
platform_get_irq

Change the initialization order of the HW so that the interrupt is only requested after the HW is initialized

Also the use of irq_of_parse_and_map is replaced by platform_get_irq.

---
 drivers/spi/spi-bcm2835aux.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/spi/spi-bcm2835aux.c +4 -4
index 05d2d6eb7bfa..7de6f8472a81 100644
@@ -429,7 +429,7 @@ static int bcm2835aux_spi_probe(struct platform_device *pdev)
 		goto out_master_put;
 	}
 
-	bs->irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
+	bs->irq = platform_get_irq(pdev, 0);
 	if (bs->irq <= 0) {
 		dev_err(&pdev->dev, "could not get IRQ: %d\n", bs->irq);
 		err = bs->irq ? bs->irq : -ENODEV;
@@ -451,6 +451,9 @@ static int bcm2835aux_spi_probe(struct platform_device *pdev)
 		goto out_clk_disable;
 	}
 
+	/* reset SPI-HW block */
+	bcm2835aux_spi_reset_hw(bs);
+
 	err = devm_request_irq(&pdev->dev, bs->irq,
 			       bcm2835aux_spi_interrupt,
 			       IRQF_SHARED,
@@ -460,9 +463,6 @@ static int bcm2835aux_spi_probe(struct platform_device *pdev)
 		goto out_clk_disable;
 	}
 
-	/* reset SPI-HW block */
-	bcm2835aux_spi_reset_hw(bs);
-
 	err = devm_spi_register_master(&pdev->dev, master);
 	if (err) {
 		dev_err(&pdev->dev, "could not register SPI master: %d\n", err);
Signature · 6 lines
2.6.1

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html