[RFC PATCH 02/16] ASoC: pcm512x: use "sclk" string to retrieve clock
Pierre-Louis Bossart
pierre-louis.bossart at linux.intel.com
Tue Apr 14 23:02:00 CEST 2020
>>>> Wait, so SCLK is in the *global* namespace and the provider has to
>>>> register the same name? That doesn't sound clever. It might be better
>>>> to have the board register the connection from the clock provider to
>>>> the
>>>> device rather than hard code global namespace strings like this, that
>>>> sounds like a recipie for misery.
Thinking a bit more on this, is the objection on the notion of using a
fixed string, on the way it's registered or the lack of support for
clocks in ACPI?
From a quick look, the use of a fixed string is rather prevalent, see
below. Less than 10% of codec drivers rely on a NULL string, so is it
really a dangerous precedent so use "sclk" in this case? It seems to me
that all clk providers need to use a unique string - what am I missing here?
adau17x1.c: adau->mclk = devm_clk_get(dev, "mclk");
cs42l51.c: cs42l51->mclk_handle = devm_clk_get(dev, "MCLK");
cs42xx8.c: cs42xx8->clk = devm_clk_get(dev, "mclk");
cs53l30.c: cs53l30->mclk = devm_clk_get(dev, "mclk");
cx2072x.c: cx2072x->mclk = devm_clk_get(cx2072x->dev, "mclk");
da7213.c: da7213->mclk = devm_clk_get(component->dev, "mclk");
da7218.c: da7218->mclk = devm_clk_get(component->dev, "mclk");
da7219.c: da7219->mclk = devm_clk_get(component->dev, "mclk");
es8316.c: es8316->mclk = devm_clk_get_optional(component->dev, "mclk");
es8328.c: es8328->clk = devm_clk_get(component->dev, NULL);
inno_rk3036.c: priv->pclk = devm_clk_get(&pdev->dev, "acodec_pclk");
jz4725b.c: icdc->clk = devm_clk_get(&pdev->dev, "aic");
jz4770.c: codec->clk = devm_clk_get(dev, "aic");
lochnagar-sc.c: priv->mclk = devm_clk_get(&pdev->dev, "mclk");
max98088.c: max98088->mclk = devm_clk_get(&i2c->dev, "mclk");
max98090.c: max98090->mclk = devm_clk_get(component->dev, "mclk");
max98095.c: max98095->mclk = devm_clk_get(component->dev, "mclk");
max9860.c: mclk = clk_get(dev, "mclk");
msm8916-wcd-analog.c: priv->mclk = devm_clk_get(dev, "mclk");
msm8916-wcd-digital.c: priv->ahbclk = devm_clk_get(dev, "ahbix-clk");
msm8916-wcd-digital.c: priv->mclk = devm_clk_get(dev, "mclk");
msm8916-wcd-digital.c: mclk_rate = clk_get_rate(msm8916_wcd->mclk);
nau8825.c: nau8825->mclk = devm_clk_get(nau8825->dev, "mclk");
nau8825.c: nau8825->mclk = devm_clk_get(dev, "mclk");
pcm3168a.c: pcm3168a->scki = devm_clk_get(dev, "scki");
pcm512x.c: pcm512x->sclk = devm_clk_get(dev, NULL);
rk3328_codec.c: rk3328->mclk = devm_clk_get(&pdev->dev, "mclk");
rk3328_codec.c: rk3328->pclk = devm_clk_get(&pdev->dev, "pclk");
rt5514.c: rt5514->mclk = devm_clk_get(component->dev, "mclk");
rt5616.c: rt5616->mclk = devm_clk_get(component->dev, "mclk");
rt5640.c: rt5640->mclk = devm_clk_get(component->dev, "mclk");
rt5659.c: rt5659->mclk = devm_clk_get(&i2c->dev, "mclk");
rt5660.c: rt5660->mclk = devm_clk_get(&i2c->dev, "mclk");
rt5682.c: rt5682->mclk = devm_clk_get(component->dev, "mclk");
sirf-audio-codec.c: sirf_audio_codec->clk = devm_clk_get(&pdev->dev, NULL);
sta32x.c: sta32x->xti_clk = devm_clk_get(dev, "xti");
tas571x.c: priv->mclk = devm_clk_get(dev, "mclk");
tlv320aic32x4.c: pll = devm_clk_get(component->dev, "pll");
tscs42xx.c: tscs42xx->sysclk = devm_clk_get(&i2c->dev, src_names[src]);
tscs454.c: freq = clk_get_rate(tscs454->sysclk);
tscs454.c: tscs454->sysclk = devm_clk_get(&i2c->dev, src_names[src]);
wcd9335.c: wcd->mclk = devm_clk_get(dev, "mclk");
wcd9335.c: wcd->native_clk = devm_clk_get(dev, "slimbus");
wm2000.c: wm2000->mclk = devm_clk_get(&i2c->dev, "MCLK");
wm8731.c: wm8731->mclk = devm_clk_get(&spi->dev, "mclk");
wm8731.c: wm8731->mclk = devm_clk_get(&i2c->dev, "mclk");
wm8904.c: wm8904->mclk = devm_clk_get(&i2c->dev, "mclk");
wm8960.c: wm8960->mclk = devm_clk_get(&i2c->dev, "mclk");
wm8962.c: pdata->mclk = devm_clk_get(&i2c->dev, NULL);
More information about the Alsa-devel
mailing list