Skip to content

Commit 30e31fa

Browse files
hakehuangfabiobaltieri
authored andcommitted
drivers: WM89xx: fix a dts prop naming issue
1. the clock-source is wrongly typed as clk-source, which happen to pass the build and function check. 2. and should use DT_INST_ENUM_IDX for index enumrate as string. Signed-off-by: Hake Huang <[email protected]>
1 parent 136ad68 commit 30e31fa

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/audio/wm8904.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ static const struct audio_codec_api wm8904_driver_api = {
671671
#define WM8904_INIT(n) \
672672
static const struct wm8904_driver_config wm8904_device_config_##n = { \
673673
.i2c = I2C_DT_SPEC_INST_GET(n), \
674-
.clock_source = DT_INST_PROP_OR(n, clk_source, 0), \
674+
.clock_source = DT_INST_ENUM_IDX(n, clock_source), \
675675
.mclk_dev = DEVICE_DT_GET(DT_INST_CLOCKS_CTLR_BY_NAME(n, mclk)), \
676676
.mclk_name = (clock_control_subsys_t)DT_INST_CLOCKS_CELL_BY_NAME(n, mclk, name)}; \
677677
\

drivers/audio/wm8962.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ static const struct audio_codec_api wm8962_driver_api = {.configure = wm8962_con
718718
#define wm8962_INIT(n) \
719719
static const struct wm8962_driver_config wm8962_device_config_##n = { \
720720
.i2c = I2C_DT_SPEC_INST_GET(n), \
721-
.clock_source = DT_INST_PROP_OR(n, clk_source, 0), \
721+
.clock_source = DT_INST_ENUM_IDX(n, clock_source), \
722722
.mclk_dev = DEVICE_DT_GET(DT_INST_CLOCKS_CTLR_BY_NAME(n, mclk)), \
723723
.mclk_name = (clock_control_subsys_t)DT_INST_CLOCKS_CELL_BY_NAME(n, mclk, name)}; \
724724
\

0 commit comments

Comments
 (0)