Lines Matching full:nau8822

3 // nau8822.c  --  NAU8822 ALSA Soc Audio driver
30 #include "nau8822.h"
659 struct nau8822 *nau8822 = snd_soc_component_get_drvdata(component); in nau8822_config_clkdiv() local
660 struct nau8822_pll *pll = &nau8822->pll; in nau8822_config_clkdiv()
663 switch (nau8822->div_id) { in nau8822_config_clkdiv()
672 sclk = (nau8822->sysclk * 10) / nau8822_mclk_scaler[i]; in nau8822_config_clkdiv()
715 struct nau8822 *nau8822 = snd_soc_component_get_drvdata(component); in nau8822_set_pll() local
716 struct nau8822_pll *pll_param = &nau8822->pll; in nau8822_set_pll()
776 struct nau8822 *nau8822 = snd_soc_component_get_drvdata(component); in nau8822_set_dai_sysclk() local
779 nau8822->div_id = clk_id; in nau8822_set_dai_sysclk()
780 nau8822->sysclk = freq; in nau8822_set_dai_sysclk()
782 if (nau8822->mclk) { in nau8822_set_dai_sysclk()
783 mclk_freq = clk_get_rate(nau8822->mclk); in nau8822_set_dai_sysclk()
791 nau8822->div_id = NAU8822_CLK_PLL; in nau8822_set_dai_sysclk()
796 nau8822->div_id == NAU8822_CLK_PLL ? "PLL" : "MCLK"); in nau8822_set_dai_sysclk()
866 struct nau8822 *nau8822 = snd_soc_component_get_drvdata(component); in nau8822_hw_params() local
934 if (nau8822->div_id != NAU8822_CLK_MCLK) in nau8822_hw_params()
935 div = nau8822->pll.mclk_scaler; in nau8822_hw_params()
961 struct nau8822 *nau8822 = snd_soc_component_get_drvdata(component); in nau8822_set_bias_level() local
968 if (nau8822->mclk && in nau8822_set_bias_level()
970 int ret = clk_prepare_enable(nau8822->mclk); in nau8822_set_bias_level()
985 if (nau8822->mclk && in nau8822_set_bias_level()
987 clk_disable_unprepare(nau8822->mclk); in nau8822_set_bias_level()
1036 .name = "nau8822-hifi",
1057 struct nau8822 *nau8822 = snd_soc_component_get_drvdata(component); in nau8822_suspend() local
1061 regcache_mark_dirty(nau8822->regmap); in nau8822_suspend()
1068 struct nau8822 *nau8822 = snd_soc_component_get_drvdata(component); in nau8822_resume() local
1070 regcache_sync(nau8822->regmap); in nau8822_resume()
1155 struct nau8822 *nau8822 = dev_get_platdata(dev); in nau8822_i2c_probe() local
1158 if (!nau8822) { in nau8822_i2c_probe()
1159 nau8822 = devm_kzalloc(dev, sizeof(*nau8822), GFP_KERNEL); in nau8822_i2c_probe()
1160 if (nau8822 == NULL) in nau8822_i2c_probe()
1163 i2c_set_clientdata(i2c, nau8822); in nau8822_i2c_probe()
1165 nau8822->mclk = devm_clk_get_optional(&i2c->dev, "mclk"); in nau8822_i2c_probe()
1166 if (IS_ERR(nau8822->mclk)) in nau8822_i2c_probe()
1167 return dev_err_probe(&i2c->dev, PTR_ERR(nau8822->mclk), in nau8822_i2c_probe()
1170 nau8822->regmap = devm_regmap_init_i2c(i2c, &nau8822_regmap_config); in nau8822_i2c_probe()
1171 if (IS_ERR(nau8822->regmap)) { in nau8822_i2c_probe()
1172 ret = PTR_ERR(nau8822->regmap); in nau8822_i2c_probe()
1176 nau8822->dev = dev; in nau8822_i2c_probe()
1179 ret = regmap_write(nau8822->regmap, NAU8822_REG_RESET, 0x00); in nau8822_i2c_probe()
1196 { "nau8822" },
1203 { .compatible = "nuvoton,nau8822", },
1211 .name = "nau8822",
1219 MODULE_DESCRIPTION("ASoC NAU8822 codec driver");