Lines Matching defs:wm8995

3  * wm8995.c  --  WM8995 ALSA SoC Audio driver
30 #include "wm8995.h"
397 struct wm8995_priv *wm8995 = container_of(nb, struct wm8995_priv, \
400 regcache_mark_dirty(wm8995->regmap); \
671 struct wm8995_priv *wm8995;
676 wm8995 = snd_soc_component_get_drvdata(component);
683 switch (wm8995->sysclk[aif]) {
685 rate = wm8995->mclk[0];
689 rate = wm8995->mclk[1];
693 rate = wm8995->fll[0].out;
697 rate = wm8995->fll[1].out;
711 wm8995->aifclk[aif] = rate;
722 struct wm8995_priv *wm8995;
725 wm8995 = snd_soc_component_get_drvdata(component);
739 if (wm8995->aifclk[0] == wm8995->aifclk[1])
742 if (wm8995->aifclk[0] < wm8995->aifclk[1])
1548 struct wm8995_priv *wm8995;
1559 wm8995 = snd_soc_component_get_drvdata(component);
1567 wm8995->lrclk_shared[0] */) {
1579 wm8995->lrclk_shared[1] */) {
1626 dai->id + 1, wm8995->aifclk[dai->id], bclk_rate);
1631 - wm8995->aifclk[dai->id]);
1634 - wm8995->aifclk[dai->id]);
1654 cur_val = (wm8995->aifclk[dai->id] * 10 / bclk_divs[i]) - bclk_rate;
1661 bclk_rate = wm8995->aifclk[dai->id] * 10 / bclk_divs[best];
1799 struct wm8995_priv *wm8995;
1805 wm8995 = snd_soc_component_get_drvdata(component);
1842 if (wm8995->fll[id].src == src &&
1843 wm8995->fll[id].in == freq_in && wm8995->fll[id].out == freq_out)
1853 ret = wm8995_get_fll_config(&fll, wm8995->fll[id].in,
1854 wm8995->fll[id].out);
1890 wm8995->fll[id].in = freq_in;
1891 wm8995->fll[id].out = freq_out;
1892 wm8995->fll[id].src = src;
1909 struct wm8995_priv *wm8995;
1912 wm8995 = snd_soc_component_get_drvdata(component);
1925 wm8995->sysclk[dai->id] = WM8995_SYSCLK_MCLK1;
1926 wm8995->mclk[0] = freq;
1931 wm8995->sysclk[dai->id] = WM8995_SYSCLK_MCLK2;
1932 wm8995->mclk[1] = freq;
1937 wm8995->sysclk[dai->id] = WM8995_SYSCLK_FLL1;
1941 wm8995->sysclk[dai->id] = WM8995_SYSCLK_FLL2;
1958 struct wm8995_priv *wm8995;
1961 wm8995 = snd_soc_component_get_drvdata(component);
1968 ret = regulator_bulk_enable(ARRAY_SIZE(wm8995->supplies),
1969 wm8995->supplies);
1973 ret = regcache_sync(wm8995->regmap);
1987 regulator_bulk_disable(ARRAY_SIZE(wm8995->supplies),
1988 wm8995->supplies);
1997 struct wm8995_priv *wm8995;
2001 wm8995 = snd_soc_component_get_drvdata(component);
2002 wm8995->component = component;
2004 for (i = 0; i < ARRAY_SIZE(wm8995->supplies); i++)
2005 wm8995->supplies[i].supply = wm8995_supply_names[i];
2008 ARRAY_SIZE(wm8995->supplies),
2009 wm8995->supplies);
2015 wm8995->disable_nb[0].notifier_call = wm8995_regulator_event_0;
2016 wm8995->disable_nb[1].notifier_call = wm8995_regulator_event_1;
2017 wm8995->disable_nb[2].notifier_call = wm8995_regulator_event_2;
2018 wm8995->disable_nb[3].notifier_call = wm8995_regulator_event_3;
2019 wm8995->disable_nb[4].notifier_call = wm8995_regulator_event_4;
2020 wm8995->disable_nb[5].notifier_call = wm8995_regulator_event_5;
2021 wm8995->disable_nb[6].notifier_call = wm8995_regulator_event_6;
2022 wm8995->disable_nb[7].notifier_call = wm8995_regulator_event_7;
2025 for (i = 0; i < ARRAY_SIZE(wm8995->supplies); i++) {
2027 wm8995->supplies[i].consumer,
2028 &wm8995->disable_nb[i]);
2036 ret = regulator_bulk_enable(ARRAY_SIZE(wm8995->supplies),
2037 wm8995->supplies);
2086 regulator_bulk_disable(ARRAY_SIZE(wm8995->supplies), wm8995->supplies);
2119 .name = "wm8995-aif1",
2137 .name = "wm8995-aif2",
2155 .name = "wm8995-aif3",
2203 struct wm8995_priv *wm8995;
2206 wm8995 = devm_kzalloc(&spi->dev, sizeof(*wm8995), GFP_KERNEL);
2207 if (!wm8995)
2210 spi_set_drvdata(spi, wm8995);
2212 wm8995->regmap = devm_regmap_init_spi(spi, &wm8995_regmap);
2213 if (IS_ERR(wm8995->regmap)) {
2214 ret = PTR_ERR(wm8995->regmap);
2227 .name = "wm8995",
2237 struct wm8995_priv *wm8995;
2240 wm8995 = devm_kzalloc(&i2c->dev, sizeof(*wm8995), GFP_KERNEL);
2241 if (!wm8995)
2244 i2c_set_clientdata(i2c, wm8995);
2246 wm8995->regmap = devm_regmap_init_i2c(i2c, &wm8995_regmap);
2247 if (IS_ERR(wm8995->regmap)) {
2248 ret = PTR_ERR(wm8995->regmap);
2263 {"wm8995", 0},
2271 .name = "wm8995",
2285 printk(KERN_ERR "Failed to register wm8995 I2C driver: %d\n",
2292 printk(KERN_ERR "Failed to register wm8995 SPI driver: %d\n",