Lines Matching refs:nau8810

168 	struct nau8810 *nau8810 = snd_soc_component_get_drvdata(component);  in nau8810_eq_get()  local
176 regmap_read(nau8810->regmap, reg + i, &reg_val); in nau8810_eq_get()
199 struct nau8810 *nau8810 = snd_soc_component_get_drvdata(component); in nau8810_eq_put() local
217 ret = regmap_write(nau8810->regmap, reg + i, value); in nau8810_eq_put()
405 struct nau8810 *nau8810 = snd_soc_component_get_drvdata(component); in check_mclk_select_pll() local
408 regmap_read(nau8810->regmap, NAU8810_REG_CLOCK, &value); in check_mclk_select_pll()
417 struct nau8810 *nau8810 = snd_soc_component_get_drvdata(component); in check_mic_enabled() local
420 regmap_read(nau8810->regmap, NAU8810_REG_INPUT_SIGNAL, &value); in check_mic_enabled()
423 regmap_read(nau8810->regmap, NAU8810_REG_ADCBOOST, &value); in check_mic_enabled()
516 struct nau8810 *nau8810 = snd_soc_component_get_drvdata(component); in nau8810_set_sysclk() local
518 nau8810->clk_id = clk_id; in nau8810_set_sysclk()
519 nau8810->sysclk = freq; in nau8810_set_sysclk()
520 dev_dbg(nau8810->dev, "master sysclk %dHz, source %s\n", in nau8810_set_sysclk()
570 struct nau8810 *nau8810 = snd_soc_component_get_drvdata(component); in nau8810_set_pll() local
571 struct regmap *map = nau8810->regmap; in nau8810_set_pll()
572 struct nau8810_pll *pll_param = &nau8810->pll; in nau8810_set_pll()
578 dev_err(nau8810->dev, "Unsupported input clock %d\n", freq_in); in nau8810_set_pll()
581 dev_info(nau8810->dev, "pll_int=%x pll_frac=%x mclk_scaler=%x pre_factor=%x\n", in nau8810_set_pll()
609 struct nau8810 *nau8810 = snd_soc_component_get_drvdata(component); in nau8810_set_dai_fmt() local
654 regmap_update_bits(nau8810->regmap, NAU8810_REG_IFACE, in nau8810_set_dai_fmt()
657 regmap_update_bits(nau8810->regmap, NAU8810_REG_CLOCK, in nau8810_set_dai_fmt()
663 static int nau8810_mclk_clkdiv(struct nau8810 *nau8810, int rate) in nau8810_mclk_clkdiv() argument
667 if (!nau8810->sysclk) { in nau8810_mclk_clkdiv()
668 dev_err(nau8810->dev, "Make mclk div configuration fail because of invalid system clock\n"); in nau8810_mclk_clkdiv()
677 sclk = (nau8810->sysclk * 10) / in nau8810_mclk_clkdiv()
683 dev_dbg(nau8810->dev, in nau8810_mclk_clkdiv()
687 regmap_update_bits(nau8810->regmap, NAU8810_REG_CLOCK, in nau8810_mclk_clkdiv()
689 regmap_update_bits(nau8810->regmap, NAU8810_REG_CLOCK, in nau8810_mclk_clkdiv()
699 struct nau8810 *nau8810 = snd_soc_component_get_drvdata(component); in nau8810_pcm_hw_params() local
704 regmap_read(nau8810->regmap, NAU8810_REG_CLOCK, &ctrl_val); in nau8810_pcm_hw_params()
716 regmap_update_bits(nau8810->regmap, NAU8810_REG_CLOCK, in nau8810_pcm_hw_params()
755 regmap_update_bits(nau8810->regmap, NAU8810_REG_IFACE, in nau8810_pcm_hw_params()
757 regmap_update_bits(nau8810->regmap, NAU8810_REG_SMPLR, in nau8810_pcm_hw_params()
763 if (nau8810->clk_id == NAU8810_SCLK_MCLK) { in nau8810_pcm_hw_params()
764 ret = nau8810_mclk_clkdiv(nau8810, params_rate(params)); in nau8810_pcm_hw_params()
766 dev_err(nau8810->dev, "MCLK div configuration fail\n"); in nau8810_pcm_hw_params()
775 struct nau8810 *nau8810 = snd_soc_component_get_drvdata(component); in nau8810_set_bias_level() local
776 struct regmap *map = nau8810->regmap; in nau8810_set_bias_level()
874 struct nau8810 *nau8810 = dev_get_platdata(dev); in nau8810_i2c_probe() local
876 if (!nau8810) { in nau8810_i2c_probe()
877 nau8810 = devm_kzalloc(dev, sizeof(*nau8810), GFP_KERNEL); in nau8810_i2c_probe()
878 if (!nau8810) in nau8810_i2c_probe()
881 i2c_set_clientdata(i2c, nau8810); in nau8810_i2c_probe()
883 nau8810->regmap = devm_regmap_init_i2c(i2c, &nau8810_regmap_config); in nau8810_i2c_probe()
884 if (IS_ERR(nau8810->regmap)) in nau8810_i2c_probe()
885 return PTR_ERR(nau8810->regmap); in nau8810_i2c_probe()
886 nau8810->dev = dev; in nau8810_i2c_probe()
888 regmap_write(nau8810->regmap, NAU8810_REG_RESET, 0x00); in nau8810_i2c_probe()