mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-03 15:51:40 -04:00
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.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user