drivers: ieee802154: mcr20a: define as DT device
The device already has a DT compatible (and uses DT properties). Instantiate the device using the DT-based macros and remove hardcoded name. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
adf8e4d723
commit
5314690c3b
3 changed files with 7 additions and 17 deletions
|
@ -9,12 +9,6 @@ menuconfig IEEE802154_MCR20A
|
||||||
|
|
||||||
if IEEE802154_MCR20A
|
if IEEE802154_MCR20A
|
||||||
|
|
||||||
config IEEE802154_MCR20A_DRV_NAME
|
|
||||||
string "NXP MCR20A Driver's name"
|
|
||||||
default "mcr20a"
|
|
||||||
help
|
|
||||||
This option sets the driver name
|
|
||||||
|
|
||||||
config MCR20A_IS_PART_OF_KW2XD_SIP
|
config MCR20A_IS_PART_OF_KW2XD_SIP
|
||||||
bool "MCR20A device is part of KW2xD SiP"
|
bool "MCR20A device is part of KW2xD SiP"
|
||||||
help
|
help
|
||||||
|
|
|
@ -1477,15 +1477,12 @@ static struct ieee802154_radio_api mcr20a_radio_api = {
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(CONFIG_IEEE802154_RAW_MODE)
|
#if defined(CONFIG_IEEE802154_RAW_MODE)
|
||||||
DEVICE_DEFINE(mcr20a, CONFIG_IEEE802154_MCR20A_DRV_NAME,
|
DEVICE_DT_INST_DEFINE(0, mcr20a_init, NULL, &mcr20a_context_data, NULL,
|
||||||
mcr20a_init, NULL, &mcr20a_context_data, NULL,
|
POST_KERNEL, CONFIG_IEEE802154_MCR20A_INIT_PRIO,
|
||||||
POST_KERNEL, CONFIG_IEEE802154_MCR20A_INIT_PRIO,
|
&mcr20a_radio_api);
|
||||||
&mcr20a_radio_api);
|
|
||||||
#else
|
#else
|
||||||
NET_DEVICE_INIT(mcr20a, CONFIG_IEEE802154_MCR20A_DRV_NAME,
|
NET_DEVICE_DT_INST_DEFINE(0, mcr20a_init, NULL, &mcr20a_context_data, NULL,
|
||||||
mcr20a_init, NULL, &mcr20a_context_data, NULL,
|
CONFIG_IEEE802154_MCR20A_INIT_PRIO, &mcr20a_radio_api,
|
||||||
CONFIG_IEEE802154_MCR20A_INIT_PRIO,
|
IEEE802154_L2, NET_L2_GET_CTX_TYPE(IEEE802154_L2),
|
||||||
&mcr20a_radio_api, IEEE802154_L2,
|
MCR20A_PSDU_LENGTH);
|
||||||
NET_L2_GET_CTX_TYPE(IEEE802154_L2),
|
|
||||||
MCR20A_PSDU_LENGTH);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -448,7 +448,6 @@ CONFIG_NET_DEBUG_L2_IEEE802154_DISPLAY_PACKET_TX=y
|
||||||
#CONFIG_IEEE802154_KW41Z=y
|
#CONFIG_IEEE802154_KW41Z=y
|
||||||
|
|
||||||
#CONFIG_SPI=y
|
#CONFIG_SPI=y
|
||||||
#CONFIG_IEEE802154_MCR20A_DRV_NAME="MCR20A2"
|
|
||||||
#CONFIG_IEEE802154_MCR20A_INIT_PRIO=90
|
#CONFIG_IEEE802154_MCR20A_INIT_PRIO=90
|
||||||
#CONFIG_IEEE802154_MCR20A=y
|
#CONFIG_IEEE802154_MCR20A=y
|
||||||
#CONFIG_IEEE802154_MCR20A_RX_STACK_SIZE=1024
|
#CONFIG_IEEE802154_MCR20A_RX_STACK_SIZE=1024
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue