drivers: can: mcp2515: Convert from Kconfig to DT_NODELABEL
As we phase out per instance Kconfig symbols convert to utilize DT_DRV_INST to initialize CAN instances. Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
9d4cdd732e
commit
aec38f3fda
3 changed files with 2 additions and 10 deletions
|
@ -11,8 +11,6 @@ config SPI
|
||||||
config CAN_MCP2515
|
config CAN_MCP2515
|
||||||
default y
|
default y
|
||||||
|
|
||||||
rsource "boards/*.defconfig"
|
|
||||||
|
|
||||||
endif # CAN
|
endif # CAN
|
||||||
|
|
||||||
endif # SHIELD_DFROBOT_CAN_BUS_V2_0
|
endif # SHIELD_DFROBOT_CAN_BUS_V2_0
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
# Copyright (c) 2019 Linaro Limited
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
|
|
||||||
config CAN_1
|
|
||||||
default y
|
|
||||||
depends on BOARD_NRF52DK_NRF52832
|
|
|
@ -826,7 +826,7 @@ static int mcp2515_init(struct device *dev)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_CAN_1
|
#if DT_HAS_DRV_INST(0)
|
||||||
|
|
||||||
static K_THREAD_STACK_DEFINE(mcp2515_int_thread_stack,
|
static K_THREAD_STACK_DEFINE(mcp2515_int_thread_stack,
|
||||||
CONFIG_CAN_MCP2515_INT_THREAD_STACK_SIZE);
|
CONFIG_CAN_MCP2515_INT_THREAD_STACK_SIZE);
|
||||||
|
@ -864,4 +864,4 @@ DEVICE_AND_API_INIT(can_mcp2515_1, DT_INST_LABEL(0), &mcp2515_init,
|
||||||
&mcp2515_data_1, &mcp2515_config_1, POST_KERNEL,
|
&mcp2515_data_1, &mcp2515_config_1, POST_KERNEL,
|
||||||
CONFIG_CAN_MCP2515_INIT_PRIORITY, &can_api_funcs);
|
CONFIG_CAN_MCP2515_INIT_PRIORITY, &can_api_funcs);
|
||||||
|
|
||||||
#endif /* CONFIG_CAN_1 */
|
#endif /* DT_HAS_DRV_INST(0) */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue