Add option to at86rf230 platform data to configure the type of the interrupt used by the driver.
Signed-off-by: Sascha Herrmann <sas...@ps.nvbi.de> --- drivers/net/ieee802154/at86rf230.c | 9 ++++++++- include/linux/spi/at86rf230.h | 5 +++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c index bb5d37d..e892ec3 100644 --- a/drivers/net/ieee802154/at86rf230.c +++ b/drivers/net/ieee802154/at86rf230.c @@ -37,7 +37,7 @@ struct at86rf230_local { struct spi_device *spi; - int rstn, slp_tr, dig2; + int rstn, slp_tr, dig2, irq_type; u8 part; u8 vers; @@ -764,6 +764,7 @@ static int at86rf230_fill_data(struct spi_device *spi) lp->rstn = pdata->rstn; lp->slp_tr = pdata->slp_tr; lp->dig2 = pdata->dig2; + lp->irq_type = pdata->irq_type; return 0; } @@ -881,6 +882,12 @@ static int at86rf230_probe(struct spi_device *spi) if (rc) goto err_gpio_dir; + if (lp->irq_type) { + rc = irq_set_irq_type(spi->irq, lp->irq_type); + if (rc) + goto err_gpio_dir; + } + rc = request_irq(spi->irq, at86rf230_isr, IRQF_SHARED, dev_name(&spi->dev), lp); if (rc) diff --git a/include/linux/spi/at86rf230.h b/include/linux/spi/at86rf230.h index b2b1afb..5ed8934 100644 --- a/include/linux/spi/at86rf230.h +++ b/include/linux/spi/at86rf230.h @@ -26,6 +26,11 @@ struct at86rf230_platform_data { int rstn; int slp_tr; int dig2; + + /* Set this if your platoform requires the driver to set the needed + * irq type. Most likely this will be IRQ_TYPE_EDGE_RISING. + */ + int irq_type; }; #endif -- Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread! ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb _______________________________________________ Linux-zigbee-devel mailing list Linux-zigbee-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel