Lines Matching refs:nau8810

168 	struct nau8810 *nau8810 = snd_soc_component_get_drvdata(component);  in nau8810_eq_get()  local
177 regmap_read(nau8810->regmap, reg + i, &reg_val); in nau8810_eq_get()
200 struct nau8810 *nau8810 = snd_soc_component_get_drvdata(component); in nau8810_eq_put() local
220 ret = regmap_write(nau8810->regmap, reg + i, value); in nau8810_eq_put()
408 struct nau8810 *nau8810 = snd_soc_component_get_drvdata(component); in check_mclk_select_pll() local
411 regmap_read(nau8810->regmap, NAU8810_REG_CLOCK, &value); in check_mclk_select_pll()
420 struct nau8810 *nau8810 = snd_soc_component_get_drvdata(component); in check_mic_enabled() local
423 regmap_read(nau8810->regmap, NAU8810_REG_INPUT_SIGNAL, &value); in check_mic_enabled()
426 regmap_read(nau8810->regmap, NAU8810_REG_ADCBOOST, &value); in check_mic_enabled()
519 struct nau8810 *nau8810 = snd_soc_component_get_drvdata(component); in nau8810_set_sysclk() local
521 nau8810->clk_id = clk_id; in nau8810_set_sysclk()
522 nau8810->sysclk = freq; in nau8810_set_sysclk()
523 dev_dbg(nau8810->dev, "master sysclk %dHz, source %s\n", in nau8810_set_sysclk()
573 struct nau8810 *nau8810 = snd_soc_component_get_drvdata(component); in nau8810_set_pll() local
574 struct regmap *map = nau8810->regmap; in nau8810_set_pll()
575 struct nau8810_pll *pll_param = &nau8810->pll; in nau8810_set_pll()
581 dev_err(nau8810->dev, "Unsupported input clock %d\n", freq_in); in nau8810_set_pll()
584 dev_info(nau8810->dev, "pll_int=%x pll_frac=%x mclk_scaler=%x pre_factor=%x\n", in nau8810_set_pll()
612 struct nau8810 *nau8810 = snd_soc_component_get_drvdata(component); in nau8810_set_dai_fmt() local
657 regmap_update_bits(nau8810->regmap, NAU8810_REG_IFACE, in nau8810_set_dai_fmt()
660 regmap_update_bits(nau8810->regmap, NAU8810_REG_CLOCK, in nau8810_set_dai_fmt()
666 static int nau8810_mclk_clkdiv(struct nau8810 *nau8810, int rate) in nau8810_mclk_clkdiv() argument
670 if (!nau8810->sysclk) { in nau8810_mclk_clkdiv()
671 dev_err(nau8810->dev, "Make mclk div configuration fail because of invalid system clock\n"); in nau8810_mclk_clkdiv()
680 sclk = (nau8810->sysclk * 10) / in nau8810_mclk_clkdiv()
686 dev_dbg(nau8810->dev, in nau8810_mclk_clkdiv()
690 regmap_update_bits(nau8810->regmap, NAU8810_REG_CLOCK, in nau8810_mclk_clkdiv()
692 regmap_update_bits(nau8810->regmap, NAU8810_REG_CLOCK, in nau8810_mclk_clkdiv()
702 struct nau8810 *nau8810 = snd_soc_component_get_drvdata(component); in nau8810_pcm_hw_params() local
707 regmap_read(nau8810->regmap, NAU8810_REG_CLOCK, &ctrl_val); in nau8810_pcm_hw_params()
719 regmap_update_bits(nau8810->regmap, NAU8810_REG_CLOCK, in nau8810_pcm_hw_params()
758 regmap_update_bits(nau8810->regmap, NAU8810_REG_IFACE, in nau8810_pcm_hw_params()
760 regmap_update_bits(nau8810->regmap, NAU8810_REG_SMPLR, in nau8810_pcm_hw_params()
766 if (nau8810->clk_id == NAU8810_SCLK_MCLK) { in nau8810_pcm_hw_params()
767 ret = nau8810_mclk_clkdiv(nau8810, params_rate(params)); in nau8810_pcm_hw_params()
769 dev_err(nau8810->dev, "MCLK div configuration fail\n"); in nau8810_pcm_hw_params()
778 struct nau8810 *nau8810 = snd_soc_component_get_drvdata(component); in nau8810_set_bias_level() local
779 struct regmap *map = nau8810->regmap; in nau8810_set_bias_level()
877 struct nau8810 *nau8810 = dev_get_platdata(dev); in nau8810_i2c_probe() local
879 if (!nau8810) { in nau8810_i2c_probe()
880 nau8810 = devm_kzalloc(dev, sizeof(*nau8810), GFP_KERNEL); in nau8810_i2c_probe()
881 if (!nau8810) in nau8810_i2c_probe()
884 i2c_set_clientdata(i2c, nau8810); in nau8810_i2c_probe()
886 nau8810->regmap = devm_regmap_init_i2c(i2c, &nau8810_regmap_config); in nau8810_i2c_probe()
887 if (IS_ERR(nau8810->regmap)) in nau8810_i2c_probe()
888 return PTR_ERR(nau8810->regmap); in nau8810_i2c_probe()
889 nau8810->dev = dev; in nau8810_i2c_probe()
891 regmap_write(nau8810->regmap, NAU8810_REG_RESET, 0x00); in nau8810_i2c_probe()