Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 702d211c authored by Alexander Aring's avatar Alexander Aring Committed by Marcel Holtmann
Browse files

at86rf230: add irq low-level for polarity



The at86rf2xx chips supports the setting of irq polarity if active low
or active high. This patch adds a handling for IRQ_ACTIVE_LOW if the
irq_type is IRQ_TYPE_LEVEL_LOW.

Signed-off-by: default avatarAlexander Aring <alex.aring@gmail.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent be64f076
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1321,7 +1321,8 @@ static int at86rf230_hw_init(struct at86rf230_local *lp, u8 xtal_trim)
		return rc;

	irq_type = irq_get_trigger_type(lp->spi->irq);
	if (irq_type == IRQ_TYPE_EDGE_FALLING)
	if (irq_type == IRQ_TYPE_EDGE_FALLING ||
	    irq_type == IRQ_TYPE_LEVEL_LOW)
		irq_pol = IRQ_ACTIVE_LOW;

	rc = at86rf230_write_subreg(lp, SR_IRQ_POLARITY, irq_pol);