Lines Matching refs:wm8995

397 	struct wm8995_priv *wm8995 = container_of(nb, struct wm8995_priv, \
400 regcache_mark_dirty(wm8995->regmap); \
671 struct wm8995_priv *wm8995; in configure_aif_clock() local
676 wm8995 = snd_soc_component_get_drvdata(component); in configure_aif_clock()
683 switch (wm8995->sysclk[aif]) { in configure_aif_clock()
685 rate = wm8995->mclk[0]; in configure_aif_clock()
689 rate = wm8995->mclk[1]; in configure_aif_clock()
693 rate = wm8995->fll[0].out; in configure_aif_clock()
697 rate = wm8995->fll[1].out; in configure_aif_clock()
711 wm8995->aifclk[aif] = rate; in configure_aif_clock()
722 struct wm8995_priv *wm8995; in configure_clock() local
725 wm8995 = snd_soc_component_get_drvdata(component); in configure_clock()
739 if (wm8995->aifclk[0] == wm8995->aifclk[1]) in configure_clock()
742 if (wm8995->aifclk[0] < wm8995->aifclk[1]) in configure_clock()
1548 struct wm8995_priv *wm8995; in wm8995_hw_params() local
1559 wm8995 = snd_soc_component_get_drvdata(component); in wm8995_hw_params()
1626 dai->id + 1, wm8995->aifclk[dai->id], bclk_rate); in wm8995_hw_params()
1631 - wm8995->aifclk[dai->id]); in wm8995_hw_params()
1634 - wm8995->aifclk[dai->id]); in wm8995_hw_params()
1654 cur_val = (wm8995->aifclk[dai->id] * 10 / bclk_divs[i]) - bclk_rate; in wm8995_hw_params()
1661 bclk_rate = wm8995->aifclk[dai->id] * 10 / bclk_divs[best]; in wm8995_hw_params()
1799 struct wm8995_priv *wm8995; in wm8995_set_fll() local
1805 wm8995 = snd_soc_component_get_drvdata(component); in wm8995_set_fll()
1842 if (wm8995->fll[id].src == src && in wm8995_set_fll()
1843 wm8995->fll[id].in == freq_in && wm8995->fll[id].out == freq_out) in wm8995_set_fll()
1853 ret = wm8995_get_fll_config(&fll, wm8995->fll[id].in, in wm8995_set_fll()
1854 wm8995->fll[id].out); in wm8995_set_fll()
1890 wm8995->fll[id].in = freq_in; in wm8995_set_fll()
1891 wm8995->fll[id].out = freq_out; in wm8995_set_fll()
1892 wm8995->fll[id].src = src; in wm8995_set_fll()
1909 struct wm8995_priv *wm8995; in wm8995_set_dai_sysclk() local
1912 wm8995 = snd_soc_component_get_drvdata(component); in wm8995_set_dai_sysclk()
1925 wm8995->sysclk[dai->id] = WM8995_SYSCLK_MCLK1; in wm8995_set_dai_sysclk()
1926 wm8995->mclk[0] = freq; in wm8995_set_dai_sysclk()
1931 wm8995->sysclk[dai->id] = WM8995_SYSCLK_MCLK2; in wm8995_set_dai_sysclk()
1932 wm8995->mclk[1] = freq; in wm8995_set_dai_sysclk()
1937 wm8995->sysclk[dai->id] = WM8995_SYSCLK_FLL1; in wm8995_set_dai_sysclk()
1941 wm8995->sysclk[dai->id] = WM8995_SYSCLK_FLL2; in wm8995_set_dai_sysclk()
1958 struct wm8995_priv *wm8995; in wm8995_set_bias_level() local
1961 wm8995 = snd_soc_component_get_drvdata(component); in wm8995_set_bias_level()
1968 ret = regulator_bulk_enable(ARRAY_SIZE(wm8995->supplies), in wm8995_set_bias_level()
1969 wm8995->supplies); in wm8995_set_bias_level()
1973 ret = regcache_sync(wm8995->regmap); in wm8995_set_bias_level()
1987 regulator_bulk_disable(ARRAY_SIZE(wm8995->supplies), in wm8995_set_bias_level()
1988 wm8995->supplies); in wm8995_set_bias_level()
1997 struct wm8995_priv *wm8995; in wm8995_probe() local
2001 wm8995 = snd_soc_component_get_drvdata(component); in wm8995_probe()
2002 wm8995->component = component; in wm8995_probe()
2004 for (i = 0; i < ARRAY_SIZE(wm8995->supplies); i++) in wm8995_probe()
2005 wm8995->supplies[i].supply = wm8995_supply_names[i]; in wm8995_probe()
2008 ARRAY_SIZE(wm8995->supplies), in wm8995_probe()
2009 wm8995->supplies); in wm8995_probe()
2015 wm8995->disable_nb[0].notifier_call = wm8995_regulator_event_0; in wm8995_probe()
2016 wm8995->disable_nb[1].notifier_call = wm8995_regulator_event_1; in wm8995_probe()
2017 wm8995->disable_nb[2].notifier_call = wm8995_regulator_event_2; in wm8995_probe()
2018 wm8995->disable_nb[3].notifier_call = wm8995_regulator_event_3; in wm8995_probe()
2019 wm8995->disable_nb[4].notifier_call = wm8995_regulator_event_4; in wm8995_probe()
2020 wm8995->disable_nb[5].notifier_call = wm8995_regulator_event_5; in wm8995_probe()
2021 wm8995->disable_nb[6].notifier_call = wm8995_regulator_event_6; in wm8995_probe()
2022 wm8995->disable_nb[7].notifier_call = wm8995_regulator_event_7; in wm8995_probe()
2025 for (i = 0; i < ARRAY_SIZE(wm8995->supplies); i++) { in wm8995_probe()
2027 wm8995->supplies[i].consumer, in wm8995_probe()
2028 &wm8995->disable_nb[i]); in wm8995_probe()
2036 ret = regulator_bulk_enable(ARRAY_SIZE(wm8995->supplies), in wm8995_probe()
2037 wm8995->supplies); in wm8995_probe()
2086 regulator_bulk_disable(ARRAY_SIZE(wm8995->supplies), wm8995->supplies); in wm8995_probe()
2202 struct wm8995_priv *wm8995; in wm8995_spi_probe() local
2205 wm8995 = devm_kzalloc(&spi->dev, sizeof(*wm8995), GFP_KERNEL); in wm8995_spi_probe()
2206 if (!wm8995) in wm8995_spi_probe()
2209 spi_set_drvdata(spi, wm8995); in wm8995_spi_probe()
2211 wm8995->regmap = devm_regmap_init_spi(spi, &wm8995_regmap); in wm8995_spi_probe()
2212 if (IS_ERR(wm8995->regmap)) { in wm8995_spi_probe()
2213 ret = PTR_ERR(wm8995->regmap); in wm8995_spi_probe()
2235 struct wm8995_priv *wm8995; in wm8995_i2c_probe() local
2238 wm8995 = devm_kzalloc(&i2c->dev, sizeof(*wm8995), GFP_KERNEL); in wm8995_i2c_probe()
2239 if (!wm8995) in wm8995_i2c_probe()
2242 i2c_set_clientdata(i2c, wm8995); in wm8995_i2c_probe()
2244 wm8995->regmap = devm_regmap_init_i2c(i2c, &wm8995_regmap); in wm8995_i2c_probe()
2245 if (IS_ERR(wm8995->regmap)) { in wm8995_i2c_probe()
2246 ret = PTR_ERR(wm8995->regmap); in wm8995_i2c_probe()