Commit 363c2cd6 authored by Phoebe Buckheister's avatar Phoebe Buckheister Committed by David S. Miller

at86rf230: fix irq setup

Commit 8eba0eef ("at86rf230: remove irq_type in
request_irq") removed the trigger configuration when requesting an irq,
and instead relied on the interrupt trigger to be properly configured
already. This does not seem to be an assumption that can be safely made,
since boards disable all interrupt triggers on boot.

On these boards, force the irq to trigger on rising edge, which is also
the default for the chip.
Signed-off-by: default avatarPhoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8f2877ca
...@@ -1137,6 +1137,8 @@ static int at86rf230_probe(struct spi_device *spi) ...@@ -1137,6 +1137,8 @@ static int at86rf230_probe(struct spi_device *spi)
dev->flags = IEEE802154_HW_OMIT_CKSUM | IEEE802154_HW_AACK; dev->flags = IEEE802154_HW_OMIT_CKSUM | IEEE802154_HW_AACK;
irq_type = irq_get_trigger_type(spi->irq); irq_type = irq_get_trigger_type(spi->irq);
if (!irq_type)
irq_type = IRQF_TRIGGER_RISING;
if (irq_type & (IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING)) { if (irq_type & (IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING)) {
irq_worker = at86rf230_irqwork; irq_worker = at86rf230_irqwork;
irq_handler = at86rf230_isr; irq_handler = at86rf230_isr;
...@@ -1168,7 +1170,8 @@ static int at86rf230_probe(struct spi_device *spi) ...@@ -1168,7 +1170,8 @@ static int at86rf230_probe(struct spi_device *spi)
if (rc) if (rc)
goto err_hw_init; goto err_hw_init;
rc = devm_request_irq(&spi->dev, spi->irq, irq_handler, IRQF_SHARED, rc = devm_request_irq(&spi->dev, spi->irq, irq_handler,
IRQF_SHARED | irq_type,
dev_name(&spi->dev), lp); dev_name(&spi->dev), lp);
if (rc) if (rc)
goto err_hw_init; goto err_hw_init;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment