Lines Matching refs:es8311

429 					  struct es8311_priv *es8311)  in es8311_set_sysclk_constraints()  argument
434 count < ARRAY_SIZE(es8311->rates); i++) { in es8311_set_sysclk_constraints()
437 if (count > 0 && coeff->rate == es8311->rates[count - 1]) in es8311_set_sysclk_constraints()
442 es8311->rates[count++] = coeff->rate; in es8311_set_sysclk_constraints()
445 es8311->constraints.list = es8311->rates; in es8311_set_sysclk_constraints()
446 es8311->constraints.count = count; in es8311_set_sysclk_constraints()
453 struct es8311_priv *es8311 = snd_soc_component_get_drvdata(component); in es8311_mute() local
460 regmap_update_bits(es8311->regmap, ES8311_DAC1, mask, val); in es8311_mute()
470 struct es8311_priv *es8311 = snd_soc_component_get_drvdata(component); in es8311_startup() local
472 if (es8311->constraints.list) { in es8311_startup()
475 &es8311->constraints); in es8311_startup()
486 struct es8311_priv *es8311 = snd_soc_component_get_drvdata(component); in es8311_hw_params() local
521 if (es8311->mclk_freq > ES8311_MCLK_MAX_FREQ) { in es8311_hw_params()
523 es8311->mclk_freq); in es8311_hw_params()
527 unsigned int mclk_freq = es8311->mclk_freq; in es8311_hw_params()
532 if (es8311->provider) { in es8311_hw_params()
592 if (es8311->provider) { in es8311_hw_params()
645 struct es8311_priv *es8311 = snd_soc_component_get_drvdata(component); in es8311_set_sysclk() local
653 if (es8311->mclk_freq == freq) in es8311_set_sysclk()
656 es8311->mclk_freq = freq; in es8311_set_sysclk()
657 es8311->constraints.list = NULL; in es8311_set_sysclk()
658 es8311->constraints.count = 0; in es8311_set_sysclk()
663 int ret = clk_set_rate(es8311->mclk, freq); in es8311_set_sysclk()
669 es8311_set_sysclk_constraints(freq, es8311); in es8311_set_sysclk()
677 struct es8311_priv *es8311 = snd_soc_component_get_drvdata(component); in es8311_set_dai_fmt() local
682 es8311->provider = true; in es8311_set_dai_fmt()
690 es8311->provider = false; in es8311_set_dai_fmt()
762 struct es8311_priv *es8311 = snd_soc_component_get_drvdata(component); in es8311_set_bias_level() local
771 int ret = clk_prepare_enable(es8311->mclk); in es8311_set_bias_level()
786 clk_disable_unprepare(es8311->mclk); in es8311_set_bias_level()
849 struct es8311_priv *es8311; in es8311_suspend() local
851 es8311 = snd_soc_component_get_drvdata(component); in es8311_suspend()
855 regcache_cache_only(es8311->regmap, true); in es8311_suspend()
856 regcache_mark_dirty(es8311->regmap); in es8311_suspend()
863 struct es8311_priv *es8311; in es8311_resume() local
865 es8311 = snd_soc_component_get_drvdata(component); in es8311_resume()
869 regcache_cache_only(es8311->regmap, false); in es8311_resume()
870 regcache_sync(es8311->regmap); in es8311_resume()
877 struct es8311_priv *es8311; in es8311_component_probe() local
879 es8311 = snd_soc_component_get_drvdata(component); in es8311_component_probe()
881 es8311->mclk = devm_clk_get_optional(component->dev, "mclk"); in es8311_component_probe()
882 if (IS_ERR(es8311->mclk)) { in es8311_component_probe()
884 return PTR_ERR(es8311->mclk); in es8311_component_probe()
887 es8311->mclk_freq = clk_get_rate(es8311->mclk); in es8311_component_probe()
888 if (es8311->mclk_freq > 0 && es8311->mclk_freq < ES8311_MCLK_MAX_FREQ) in es8311_component_probe()
889 es8311_set_sysclk_constraints(es8311->mclk_freq, es8311); in es8311_component_probe()
927 struct es8311_priv *es8311; in es8311_i2c_probe() local
931 es8311 = devm_kzalloc(dev, sizeof(*es8311), GFP_KERNEL); in es8311_i2c_probe()
932 if (es8311 == NULL) in es8311_i2c_probe()
935 es8311->regmap = in es8311_i2c_probe()
937 if (IS_ERR(es8311->regmap)) in es8311_i2c_probe()
938 return PTR_ERR(es8311->regmap); in es8311_i2c_probe()
940 i2c_set_clientdata(i2c_client, es8311); in es8311_i2c_probe()