[PATCH] ASoC: intel: cht_bsw_max98090_ti: Sleep a bit after enabling the mclk

From: Hans de Goede
Date: Thu Nov 01 2018 - 10:47:42 EST


Sleep a bit after enabling the mclk to give the PLL some time to lock,
this fixes the log showing a whole bunch of:

kernel: max98090 i2c-193C9890:00: PLL unlocked

errors.

Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
---
sound/soc/intel/boards/cht_bsw_max98090_ti.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/sound/soc/intel/boards/cht_bsw_max98090_ti.c b/sound/soc/intel/boards/cht_bsw_max98090_ti.c
index 9d9f6e41d81c..f3bc0bfdfe08 100644
--- a/sound/soc/intel/boards/cht_bsw_max98090_ti.c
+++ b/sound/soc/intel/boards/cht_bsw_max98090_ti.c
@@ -19,6 +19,7 @@
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/

+#include <linux/delay.h>
#include <linux/dmi.h>
#include <linux/module.h>
#include <linux/platform_device.h>
@@ -66,6 +67,7 @@ static int platform_clock_control(struct snd_soc_dapm_widget *w,
"could not configure MCLK state");
return ret;
}
+ usleep_range(5000, 10000);
} else {
clk_disable_unprepare(ctx->mclk);
}
--
2.19.0


--------------4C6AD7A7F5E4C83A3777E2D3--