Commit 169e154b authored by Mark Brown's avatar Mark Brown

ASoC: wm8960: Clocking tweaks

Merge series from Mark Brown <broonie@kernel.org>:

A couple of minor clocking improvements that make the wm8960 driver work
a bit better with generic cards.
parents 36eb9868 2bbc2df4
......@@ -1429,6 +1429,14 @@ static int wm8960_i2c_probe(struct i2c_client *i2c)
if (IS_ERR(wm8960->mclk)) {
if (PTR_ERR(wm8960->mclk) == -EPROBE_DEFER)
return -EPROBE_DEFER;
} else {
ret = clk_get_rate(wm8960->mclk);
if (ret >= 0) {
wm8960->freq_in = ret;
} else {
dev_err(&i2c->dev, "Failed to read MCLK rate: %d\n",
ret);
}
}
wm8960->regmap = devm_regmap_init_i2c(i2c, &wm8960_regmap);
......
......@@ -77,9 +77,9 @@
#define WM8960_SYSCLK_DIV_1 (0 << 1)
#define WM8960_SYSCLK_DIV_2 (2 << 1)
#define WM8960_SYSCLK_MCLK (0 << 0)
#define WM8960_SYSCLK_AUTO (0 << 0)
#define WM8960_SYSCLK_PLL (1 << 0)
#define WM8960_SYSCLK_AUTO (2 << 0)
#define WM8960_SYSCLK_MCLK (2 << 0)
#define WM8960_DAC_DIV_1 (0 << 3)
#define WM8960_DAC_DIV_1_5 (1 << 3)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment