Skip to content

Commit 4f88301

Browse files
dbalutahenrikbrixandersen
authored andcommitted
drivers: sai: Use 0x0 as clock id if none is provided
We use the name cell at a given index to retrieve a clock's id. But not all clocks provide a name cell, so use 0x0 as clock-id for these situations. Signed-off-by: Daniel Baluta <[email protected]>
1 parent 0687522 commit 4f88301

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/dai/nxp/sai/sai.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ LOG_MODULE_REGISTER(nxp_dai_sai);
3838

3939
/* used to retrieve a clock's ID using its index generated via _SAI_CLOCK_INDEX_ARRAY */
4040
#define _SAI_GET_CLOCK_ID(clock_idx, inst)\
41-
DT_INST_CLOCKS_CELL_BY_IDX(inst, clock_idx, name)
41+
DT_INST_PHA_BY_IDX_OR(inst, clocks, clock_idx, name, 0x0)
4242

4343
/* used to retrieve a clock's name using its index generated via _SAI_CLOCK_INDEX_ARRAY */
4444
#define _SAI_GET_CLOCK_NAME(clock_idx, inst)\

0 commit comments

Comments
 (0)