Skip to content

Commit 744338f

Browse files
swift-tknashif
authored andcommitted
drivers: mspi: fix incorrect DT macro used in controller emulator
DT_INST* should be used in MSPI_CONFIG or device tree value capture will fail sliently and fall back to defaults. Signed-off-by: Swift Tian <[email protected]>
1 parent c9a1db6 commit 744338f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/mspi/mspi_emul.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -860,8 +860,8 @@ static struct emul_mspi_driver_api emul_mspi_driver_api = {
860860
#define MSPI_CONFIG(n) \
861861
{ \
862862
.channel_num = EMUL_MSPI_INST_ID, \
863-
.op_mode = DT_ENUM_IDX_OR(n, op_mode, MSPI_OP_MODE_CONTROLLER), \
864-
.duplex = DT_ENUM_IDX_OR(n, duplex, MSPI_HALF_DUPLEX), \
863+
.op_mode = DT_INST_ENUM_IDX_OR(n, op_mode, MSPI_OP_MODE_CONTROLLER),\
864+
.duplex = DT_INST_ENUM_IDX_OR(n, duplex, MSPI_HALF_DUPLEX), \
865865
.max_freq = DT_INST_PROP(n, clock_frequency), \
866866
.dqs_support = DT_INST_PROP_OR(n, dqs_support, false), \
867867
.sw_multi_periph = DT_INST_PROP(n, software_multiperipheral), \

0 commit comments

Comments
 (0)