video: stm32: dcmi: fix video interface properties read
This commit fixes an error introduced by commit c0dae0c9ac
("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>
This commit is contained in:
parent
e3aa34972e
commit
b03ec6dd29
1 changed files with 4 additions and 4 deletions
|
@ -472,18 +472,18 @@ static struct video_stm32_dcmi_data video_stm32_dcmi_data_0 = {
|
|||
.Instance = (DCMI_TypeDef *) DT_INST_REG_ADDR(0),
|
||||
.Init = {
|
||||
.SynchroMode = DCMI_SYNCHRO_HARDWARE,
|
||||
.PCKPolarity = DT_PROP_OR(DT_INST_ENDPOINT_BY_ID(n, 0, 0),
|
||||
.PCKPolarity = DT_PROP_OR(DT_INST_ENDPOINT_BY_ID(0, 0, 0),
|
||||
pclk_sample, 0) ?
|
||||
DCMI_PCKPOLARITY_RISING :
|
||||
DCMI_PCKPOLARITY_FALLING,
|
||||
.HSPolarity = DT_PROP_OR(DT_INST_ENDPOINT_BY_ID(n, 0, 0),
|
||||
.HSPolarity = DT_PROP_OR(DT_INST_ENDPOINT_BY_ID(0, 0, 0),
|
||||
hsync_active, 0) ?
|
||||
DCMI_HSPOLARITY_HIGH : DCMI_HSPOLARITY_LOW,
|
||||
.VSPolarity = DT_PROP_OR(DT_INST_ENDPOINT_BY_ID(n, 0, 0),
|
||||
.VSPolarity = DT_PROP_OR(DT_INST_ENDPOINT_BY_ID(0, 0, 0),
|
||||
vsync_active, 0) ?
|
||||
DCMI_VSPOLARITY_HIGH : DCMI_VSPOLARITY_LOW,
|
||||
.ExtendedDataMode = STM32_DCMI_GET_BUS_WIDTH(
|
||||
DT_PROP_OR(DT_INST_ENDPOINT_BY_ID(n, 0, 0),
|
||||
DT_PROP_OR(DT_INST_ENDPOINT_BY_ID(0, 0, 0),
|
||||
bus_width, 8)),
|
||||
.JPEGMode = DCMI_JPEG_DISABLE,
|
||||
.ByteSelectMode = DCMI_BSM_ALL,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue