Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect DT macro usage in MSPI API test and controller emulator #80089

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions drivers/mspi/mspi_emul.c
Original file line number Diff line number Diff line change
Expand Up @@ -860,12 +860,12 @@
#define MSPI_CONFIG(n) \
{ \
.channel_num = EMUL_MSPI_INST_ID, \
.op_mode = DT_ENUM_IDX_OR(n, op_mode, MSPI_OP_MODE_CONTROLLER), \
.duplex = DT_ENUM_IDX_OR(n, duplex, MSPI_HALF_DUPLEX), \
.op_mode = DT_INST_ENUM_IDX_OR(n, op_mode, MSPI_OP_MODE_CONTROLLER),\
.duplex = DT_INST_ENUM_IDX_OR(n, duplex, MSPI_HALF_DUPLEX), \
.max_freq = DT_INST_PROP(n, clock_frequency), \
.dqs_support = DT_INST_PROP_OR(n, dqs_support, false), \
.sw_multi_periph = DT_INST_PROP(n, software_multiperipheral), \
}

Check notice on line 868 in drivers/mspi/mspi_emul.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

drivers/mspi/mspi_emul.c:868 -#define MSPI_CONFIG(n) \ - { \ - .channel_num = EMUL_MSPI_INST_ID, \ - .op_mode = DT_INST_ENUM_IDX_OR(n, op_mode, MSPI_OP_MODE_CONTROLLER),\ - .duplex = DT_INST_ENUM_IDX_OR(n, duplex, MSPI_HALF_DUPLEX), \ - .max_freq = DT_INST_PROP(n, clock_frequency), \ - .dqs_support = DT_INST_PROP_OR(n, dqs_support, false), \ - .sw_multi_periph = DT_INST_PROP(n, software_multiperipheral), \ +#define MSPI_CONFIG(n) \ + { \ + .channel_num = EMUL_MSPI_INST_ID, \ + .op_mode = DT_INST_ENUM_IDX_OR(n, op_mode, MSPI_OP_MODE_CONTROLLER), \ + .duplex = DT_INST_ENUM_IDX_OR(n, duplex, MSPI_HALF_DUPLEX), \ + .max_freq = DT_INST_PROP(n, clock_frequency), \ + .dqs_support = DT_INST_PROP_OR(n, dqs_support, false), \ + .sw_multi_periph = DT_INST_PROP(n, software_multiperipheral), \

Check notice on line 868 in drivers/mspi/mspi_emul.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

drivers/mspi/mspi_emul.c:868 -#define MSPI_CONFIG(n) \ - { \ - .channel_num = EMUL_MSPI_INST_ID, \ - .op_mode = DT_INST_ENUM_IDX_OR(n, op_mode, MSPI_OP_MODE_CONTROLLER),\ - .duplex = DT_INST_ENUM_IDX_OR(n, duplex, MSPI_HALF_DUPLEX), \ - .max_freq = DT_INST_PROP(n, clock_frequency), \ - .dqs_support = DT_INST_PROP_OR(n, dqs_support, false), \ - .sw_multi_periph = DT_INST_PROP(n, software_multiperipheral), \ +#define MSPI_CONFIG(n) \ + { \ + .channel_num = EMUL_MSPI_INST_ID, \ + .op_mode = DT_INST_ENUM_IDX_OR(n, op_mode, MSPI_OP_MODE_CONTROLLER), \ + .duplex = DT_INST_ENUM_IDX_OR(n, duplex, MSPI_HALF_DUPLEX), \ + .max_freq = DT_INST_PROP(n, clock_frequency), \ + .dqs_support = DT_INST_PROP_OR(n, dqs_support, false), \ + .sw_multi_periph = DT_INST_PROP(n, software_multiperipheral), \

#define EMUL_LINK_AND_COMMA(node_id) \
{ \
Expand Down
4 changes: 2 additions & 2 deletions tests/drivers/mspi/api/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@
#if TEST_MSPI_REINIT
struct mspi_cfg hardware_cfg = {
.channel_num = 0,
.op_mode = DT_PROP_OR(MSPI_BUS_NODE, op_mode, MSPI_OP_MODE_CONTROLLER),
.duplex = DT_PROP_OR(MSPI_BUS_NODE, duplex, MSPI_HALF_DUPLEX),
.op_mode = DT_ENUM_IDX_OR(MSPI_BUS_NODE, op_mode, MSPI_OP_MODE_CONTROLLER),
.duplex = DT_ENUM_IDX_OR(MSPI_BUS_NODE, duplex, MSPI_HALF_DUPLEX),
.dqs_support = DT_PROP_OR(MSPI_BUS_NODE, dqs_support, false),
.ce_group = ce_gpios,
.num_ce_gpios = ARRAY_SIZE(ce_gpios),
.num_periph = DT_CHILD_NUM(MSPI_BUS_NODE),
.max_freq = DT_PROP(MSPI_BUS_NODE, clock_frequency),
.re_init = true,
};

Check notice on line 42 in tests/drivers/mspi/api/src/main.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

tests/drivers/mspi/api/src/main.c:42 - .channel_num = 0, - .op_mode = DT_ENUM_IDX_OR(MSPI_BUS_NODE, op_mode, MSPI_OP_MODE_CONTROLLER), - .duplex = DT_ENUM_IDX_OR(MSPI_BUS_NODE, duplex, MSPI_HALF_DUPLEX), - .dqs_support = DT_PROP_OR(MSPI_BUS_NODE, dqs_support, false), - .ce_group = ce_gpios, - .num_ce_gpios = ARRAY_SIZE(ce_gpios), - .num_periph = DT_CHILD_NUM(MSPI_BUS_NODE), - .max_freq = DT_PROP(MSPI_BUS_NODE, clock_frequency), - .re_init = true, + .channel_num = 0, + .op_mode = DT_ENUM_IDX_OR(MSPI_BUS_NODE, op_mode, MSPI_OP_MODE_CONTROLLER), + .duplex = DT_ENUM_IDX_OR(MSPI_BUS_NODE, duplex, MSPI_HALF_DUPLEX), + .dqs_support = DT_PROP_OR(MSPI_BUS_NODE, dqs_support, false), + .ce_group = ce_gpios, + .num_ce_gpios = ARRAY_SIZE(ce_gpios), + .num_periph = DT_CHILD_NUM(MSPI_BUS_NODE), + .max_freq = DT_PROP(MSPI_BUS_NODE, clock_frequency), + .re_init = true,

Check notice on line 42 in tests/drivers/mspi/api/src/main.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

tests/drivers/mspi/api/src/main.c:42 - .channel_num = 0, - .op_mode = DT_ENUM_IDX_OR(MSPI_BUS_NODE, op_mode, MSPI_OP_MODE_CONTROLLER), - .duplex = DT_ENUM_IDX_OR(MSPI_BUS_NODE, duplex, MSPI_HALF_DUPLEX), - .dqs_support = DT_PROP_OR(MSPI_BUS_NODE, dqs_support, false), - .ce_group = ce_gpios, - .num_ce_gpios = ARRAY_SIZE(ce_gpios), - .num_periph = DT_CHILD_NUM(MSPI_BUS_NODE), - .max_freq = DT_PROP(MSPI_BUS_NODE, clock_frequency), - .re_init = true, + .channel_num = 0, + .op_mode = DT_ENUM_IDX_OR(MSPI_BUS_NODE, op_mode, MSPI_OP_MODE_CONTROLLER), + .duplex = DT_ENUM_IDX_OR(MSPI_BUS_NODE, duplex, MSPI_HALF_DUPLEX), + .dqs_support = DT_PROP_OR(MSPI_BUS_NODE, dqs_support, false), + .ce_group = ce_gpios, + .num_ce_gpios = ARRAY_SIZE(ce_gpios), + .num_periph = DT_CHILD_NUM(MSPI_BUS_NODE), + .max_freq = DT_PROP(MSPI_BUS_NODE, clock_frequency), + .re_init = true,
#endif


Expand Down
Loading