linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: kernel@martin.sperl.org (Martin Sperl)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6 2/4] spi: bcm2835: add bcm2835 auxiliary spi device driver
Date: Tue, 6 Oct 2015 13:38:10 +0200	[thread overview]
Message-ID: <5613B2A2.9020309@martin.sperl.org> (raw)
In-Reply-To: <20151006112320.GP12635@sirena.org.uk>

On 06.10.2015 13:23, Mark Brown wrote:
> On Fri, Sep 11, 2015 at 11:22:04AM +0000, kernel at martin.sperl.org wrote:
>
>> +	bs->irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
>> +	if (bs->irq <= 0) {
>> +		dev_err(&pdev->dev, "could not get IRQ: %d\n", bs->irq);
>> +		err = bs->irq ? bs->irq : -ENODEV;
>> +		goto out_master_put;
>> +	}
>
> Why are we using this unusual DT specific API here?  I'd expect to see
> just use platform_get_irq() here and this seems to be the only DT
> dependency in the driver.

I copied it from spi-bcm2835.c, where it is also used in exactly that
fashion.

You want me to move to your recommended api instead for both drivers?

>
>> +	err = devm_request_irq(&pdev->dev, bs->irq,
>> +			       bcm2835aux_spi_interrupt,
>> +			       IRQF_SHARED,
>> +			       dev_name(&pdev->dev), master);
>> +	if (err) {
>> +		dev_err(&pdev->dev, "could not request IRQ: %d\n", err);
>> +		goto out_clk_disable;
>> +	}
>> +
>> +	/* reset SPI-HW block */
>> +	bcm2835aux_spi_reset_hw(bs);
>
> I'd expect to request the IRQ after we reset the hardware in order to
> ensure that the hardware is in a known good state

Same copy/paste in this case - i can change the order for both
drivers if you want.

Martin

  reply	other threads:[~2015-10-06 11:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-11 11:22 [PATCH v6 0/4] spi: bcm2835: add spi-bcm2835aux driver kernel at martin.sperl.org
2015-09-11 11:22 ` [PATCH v6 1/4] dt/bindings: bcm2835: spi: add bindings for the bcm2835 auxiliary spi devices kernel at martin.sperl.org
2015-09-22  2:25   ` Stephen Warren
2015-09-11 11:22 ` [PATCH v6 2/4] spi: bcm2835: add bcm2835 auxiliary spi device driver kernel at martin.sperl.org
2015-10-06 11:23   ` Mark Brown
2015-10-06 11:38     ` Martin Sperl [this message]
2015-10-07 10:41       ` Mark Brown
2015-09-11 11:22 ` [PATCH v6 3/4] spi: bcm2835: add the auxiliary spi1 and spi2 to the device tree kernel at martin.sperl.org
2015-09-11 11:22 ` [PATCH v6 4/4] ARM: bcm2835: enable auxiliary spi driver in defconfig kernel at martin.sperl.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5613B2A2.9020309@martin.sperl.org \
    --to=kernel@martin.sperl.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).