Lines Matching refs:rt1308

197 	struct rt1308_priv *rt1308 = snd_soc_component_get_drvdata(component);  in rt1308_reg_init()  local
199 return regmap_multi_reg_write(rt1308->regmap, init_list, in rt1308_reg_init()
455 struct rt1308_priv *rt1308 = snd_soc_component_get_drvdata(component); in rt1308_hw_params() local
459 rt1308->lrck = params_rate(params); in rt1308_hw_params()
460 pre_div = rt1308_get_clk_info(rt1308->sysclk, rt1308->lrck); in rt1308_hw_params()
463 "Unsupported clock setting %d\n", rt1308->lrck); in rt1308_hw_params()
475 rt1308->bclk = rt1308->lrck * (32 << bclk_ms); in rt1308_hw_params()
481 rt1308->lrck, pre_div, dai->id); in rt1308_hw_params()
522 struct rt1308_priv *rt1308 = snd_soc_component_get_drvdata(component); in rt1308_set_dai_fmt() local
527 rt1308->master = 0; in rt1308_set_dai_fmt()
578 struct rt1308_priv *rt1308 = snd_soc_component_get_drvdata(component); in rt1308_set_component_sysclk() local
581 if (freq == rt1308->sysclk && clk_id == rt1308->sysclk_src) in rt1308_set_component_sysclk()
606 rt1308->sysclk = freq; in rt1308_set_component_sysclk()
607 rt1308->sysclk_src = clk_id; in rt1308_set_component_sysclk()
619 struct rt1308_priv *rt1308 = snd_soc_component_get_drvdata(component); in rt1308_set_component_pll() local
623 if (source == rt1308->pll_src && freq_in == rt1308->pll_in && in rt1308_set_component_pll()
624 freq_out == rt1308->pll_out) in rt1308_set_component_pll()
630 rt1308->pll_in = 0; in rt1308_set_component_pll()
631 rt1308->pll_out = 0; in rt1308_set_component_pll()
679 rt1308->pll_in = freq_in; in rt1308_set_component_pll()
680 rt1308->pll_out = freq_out; in rt1308_set_component_pll()
681 rt1308->pll_src = source; in rt1308_set_component_pll()
688 struct rt1308_priv *rt1308 = snd_soc_component_get_drvdata(component); in rt1308_probe() local
690 rt1308->component = component; in rt1308_probe()
697 struct rt1308_priv *rt1308 = snd_soc_component_get_drvdata(component); in rt1308_remove() local
699 regmap_write(rt1308->regmap, RT1308_RESET, 0); in rt1308_remove()
705 struct rt1308_priv *rt1308 = snd_soc_component_get_drvdata(component); in rt1308_suspend() local
707 regcache_cache_only(rt1308->regmap, true); in rt1308_suspend()
708 regcache_mark_dirty(rt1308->regmap); in rt1308_suspend()
715 struct rt1308_priv *rt1308 = snd_soc_component_get_drvdata(component); in rt1308_resume() local
717 regcache_cache_only(rt1308->regmap, false); in rt1308_resume()
718 regcache_sync(rt1308->regmap); in rt1308_resume()
803 static void rt1308_efuse(struct rt1308_priv *rt1308) in rt1308_efuse() argument
805 regmap_write(rt1308->regmap, RT1308_RESET, 0); in rt1308_efuse()
807 regmap_write(rt1308->regmap, RT1308_POWER_STATUS, 0x01800000); in rt1308_efuse()
809 regmap_write(rt1308->regmap, RT1308_EFUSE_1, 0x44fe0f00); in rt1308_efuse()
811 regmap_write(rt1308->regmap, RT1308_PVDD_OFFSET_CTL, 0x10000000); in rt1308_efuse()
816 struct rt1308_priv *rt1308; in rt1308_i2c_probe() local
820 rt1308 = devm_kzalloc(&i2c->dev, sizeof(struct rt1308_priv), in rt1308_i2c_probe()
822 if (rt1308 == NULL) in rt1308_i2c_probe()
825 i2c_set_clientdata(i2c, rt1308); in rt1308_i2c_probe()
827 rt1308->regmap = devm_regmap_init_i2c(i2c, &rt1308_regmap); in rt1308_i2c_probe()
828 if (IS_ERR(rt1308->regmap)) { in rt1308_i2c_probe()
829 ret = PTR_ERR(rt1308->regmap); in rt1308_i2c_probe()
835 regmap_read(rt1308->regmap, RT1308_VEN_DEV_ID, &val); in rt1308_i2c_probe()
843 rt1308_efuse(rt1308); in rt1308_i2c_probe()
852 struct rt1308_priv *rt1308 = i2c_get_clientdata(client); in rt1308_i2c_shutdown() local
854 regmap_write(rt1308->regmap, RT1308_RESET, 0); in rt1308_i2c_shutdown()