Skip to content

Commit 1b501e5

Browse files
committed
drivers: video: emul_rx: Explicitly set init priority
The Emul Rx needs to be initialized after the camera sensor which is generally initialized with CONFIG_VIDEO_INIT_PRIORITY. This is currently true "by chance" due to the order the linker links the object files. This linker order is not easily controlled, so use an explicit priority value to ensure this requirement. Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
1 parent 936bd24 commit 1b501e5

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

drivers/video/Kconfig.emul_rx

+7
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,10 @@ config VIDEO_EMUL_RX
88
default y
99
help
1010
Enable driver for the MIPI RX emulated DMA engine.
11+
12+
config VIDEO_EMUL_RX_INIT_PRIORITY
13+
int "Emul Rx init priority"
14+
default 61
15+
depends on VIDEO_EMUL_RX
16+
help
17+
Initialization priority for the EMUL Rx device.

drivers/video/video_emul_rx.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,6 @@ int emul_rx_init(const struct device *dev)
296296
}; \
297297
\
298298
DEVICE_DT_INST_DEFINE(n, &emul_rx_init, NULL, &emul_rx_data_##n, &emul_rx_cfg_##n, \
299-
POST_KERNEL, CONFIG_VIDEO_INIT_PRIORITY, &emul_rx_driver_api);
299+
POST_KERNEL, CONFIG_VIDEO_EMUL_RX_INIT_PRIORITY, &emul_rx_driver_api);
300300

301301
DT_INST_FOREACH_STATUS_OKAY(EMUL_RX_DEFINE)

0 commit comments

Comments
 (0)