drivers: ieee802154: fix nrf5 initialization with external irq source

MPSL is a library that provides external radio IRQ source for the
802.15.4 driver. If this library is in use, the driver shall not
configure the radio IRQ.

Signed-off-by: Hubert Miś <hubert.mis@nordicsemi.no>
This commit is contained in:
Hubert Miś 2020-06-01 12:08:03 +02:00 committed by Ioannis Glaropoulos
commit 7f66fd84e8
2 changed files with 15 additions and 0 deletions

View file

@ -438,20 +438,24 @@ static int nrf5_stop(struct device *dev)
return 0;
}
#ifndef CONFIG_IEEE802154_NRF5_EXT_IRQ_MGMT
static void nrf5_radio_irq(void *arg)
{
ARG_UNUSED(arg);
nrf_802154_radio_irq_handler();
}
#endif
static void nrf5_irq_config(struct device *dev)
{
ARG_UNUSED(dev);
#ifndef CONFIG_IEEE802154_NRF5_EXT_IRQ_MGMT
IRQ_CONNECT(RADIO_IRQn, NRF_802154_IRQ_PRIORITY,
nrf5_radio_irq, NULL, 0);
irq_enable(RADIO_IRQn);
#endif
}
static int nrf5_init(struct device *dev)