Skip to content

Commit

Permalink
at86rf230: add irq low-level for polarity
Browse files Browse the repository at this point in the history
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: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Alexander Aring authored and Marcel Holtmann committed Feb 27, 2015
1 parent be64f07 commit 702d211
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ieee802154/at86rf230.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 702d211

Please sign in to comment.