Skip to content

Commit d16cc7f

Browse files
committed
drivers: dai: dmic: use WAIT_FOR() in dai_dmic_en_power()
Replace the infinite while loop with WAIT_FOR() as is already used in other places in the dmic driver. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
1 parent 7e1255e commit d16cc7f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/dai/intel/dmic/dmic.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,9 @@ static inline void dai_dmic_en_power(const struct dai_intel_dmic *dmic)
314314

315315
#if defined(CONFIG_SOC_INTEL_ACE20_LNL) || defined(CONFIG_SOC_INTEL_ACE30) || \
316316
defined(CONFIG_SOC_INTEL_ACE40)
317-
while (!(sys_read32(base + DMICLCTL_OFFSET) & DMICLCTL_CPA)) {
318-
k_busy_wait(100);
317+
if (!WAIT_FOR((sys_read32(base + DMICLCTL_OFFSET) & DMICLCTL_CPA) != 0, 1000,
318+
k_busy_wait(100))) {
319+
LOG_ERR("power-up timeout");
319320
}
320321
#endif
321322
}

0 commit comments

Comments
 (0)