Skip to content

Commit b03ec6d

Browse files
Alain Volmatnashif
authored andcommitted
video: stm32: dcmi: fix video interface properties read
This commit fixes an error introduced by commit c0dae0c ("video: stm32: dcmi: perform config based on endpoint properties") in which incorrect instance was being access leading to usage of the default value for pixel clock / hsync / vsync polarities and bus width. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
1 parent e3aa349 commit b03ec6d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/video/video_stm32_dcmi.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -472,18 +472,18 @@ static struct video_stm32_dcmi_data video_stm32_dcmi_data_0 = {
472472
.Instance = (DCMI_TypeDef *) DT_INST_REG_ADDR(0),
473473
.Init = {
474474
.SynchroMode = DCMI_SYNCHRO_HARDWARE,
475-
.PCKPolarity = DT_PROP_OR(DT_INST_ENDPOINT_BY_ID(n, 0, 0),
475+
.PCKPolarity = DT_PROP_OR(DT_INST_ENDPOINT_BY_ID(0, 0, 0),
476476
pclk_sample, 0) ?
477477
DCMI_PCKPOLARITY_RISING :
478478
DCMI_PCKPOLARITY_FALLING,
479-
.HSPolarity = DT_PROP_OR(DT_INST_ENDPOINT_BY_ID(n, 0, 0),
479+
.HSPolarity = DT_PROP_OR(DT_INST_ENDPOINT_BY_ID(0, 0, 0),
480480
hsync_active, 0) ?
481481
DCMI_HSPOLARITY_HIGH : DCMI_HSPOLARITY_LOW,
482-
.VSPolarity = DT_PROP_OR(DT_INST_ENDPOINT_BY_ID(n, 0, 0),
482+
.VSPolarity = DT_PROP_OR(DT_INST_ENDPOINT_BY_ID(0, 0, 0),
483483
vsync_active, 0) ?
484484
DCMI_VSPOLARITY_HIGH : DCMI_VSPOLARITY_LOW,
485485
.ExtendedDataMode = STM32_DCMI_GET_BUS_WIDTH(
486-
DT_PROP_OR(DT_INST_ENDPOINT_BY_ID(n, 0, 0),
486+
DT_PROP_OR(DT_INST_ENDPOINT_BY_ID(0, 0, 0),
487487
bus_width, 8)),
488488
.JPEGMode = DCMI_JPEG_DISABLE,
489489
.ByteSelectMode = DCMI_BSM_ALL,

0 commit comments

Comments
 (0)