summaryrefslogtreecommitdiff
path: root/drivers/net/ieee802154/at86rf230.c
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2015-02-27 11:58:29 +0300
committerMarcel Holtmann <marcel@holtmann.org>2015-02-27 20:42:44 +0300
commit702d211c45d95e6788cec42f7f3c4a538e8853ef (patch)
tree03d876e393ad21b7bf68af96ebea156be862012e /drivers/net/ieee802154/at86rf230.c
parentbe64f076465a288aa850ad0dc581e5ecdb8efe46 (diff)
downloadlinux-702d211c45d95e6788cec42f7f3c4a538e8853ef.tar.xz
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: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/net/ieee802154/at86rf230.c')
-rw-r--r--drivers/net/ieee802154/at86rf230.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c
index e6dec0ac163a..c7a30ce71dcf 100644
--- a/drivers/net/ieee802154/at86rf230.c
+++ b/drivers/net/ieee802154/at86rf230.c
@@ -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);