Skip to content

Commit 1690457

Browse files
ngphibangjosuah
authored andcommitted
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 <[email protected]>
1 parent ce96558 commit 1690457

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-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

+2-1
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,8 @@ int emul_rx_init(const struct device *dev)
281281
}; \
282282
\
283283
DEVICE_DT_INST_DEFINE(n, &emul_rx_init, NULL, &emul_rx_data_##n, &emul_rx_cfg_##n, \
284-
POST_KERNEL, CONFIG_VIDEO_INIT_PRIORITY, &emul_rx_driver_api); \
284+
POST_KERNEL, CONFIG_VIDEO_EMUL_RX_INIT_PRIORITY, \
285+
&emul_rx_driver_api); \
285286
\
286287
VIDEO_DEVICE_DEFINE(emul_rx_##n, DEVICE_DT_INST_GET(n), SOURCE_DEV(n));
287288

0 commit comments

Comments
 (0)