Lines Matching refs:max9860

40 	struct max9860_priv *max9860 = container_of(nb, struct max9860_priv,  in max9860_dvddio_event()  local
43 regcache_mark_dirty(max9860->regmap); in max9860_dvddio_event()
44 regcache_cache_only(max9860->regmap, true); in max9860_dvddio_event()
256 struct max9860_priv *max9860 = snd_soc_component_get_drvdata(component); in max9860_hw_params() local
271 switch (max9860->fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) { in max9860_hw_params()
290 switch (max9860->fmt & SND_SOC_DAIFMT_FORMAT_MASK) { in max9860_hw_params()
319 switch (max9860->fmt & SND_SOC_DAIFMT_INV_MASK) { in max9860_hw_params()
323 switch (max9860->fmt & SND_SOC_DAIFMT_FORMAT_MASK) { in max9860_hw_params()
331 switch (max9860->fmt & SND_SOC_DAIFMT_FORMAT_MASK) { in max9860_hw_params()
347 ret = regmap_write(max9860->regmap, MAX9860_IFC1A, ifc1a); in max9860_hw_params()
353 ret = regmap_write(max9860->regmap, MAX9860_IFC1B, ifc1b); in max9860_hw_params()
367 switch (max9860->pclk_rate) { in max9860_hw_params()
399 max9860->pclk_rate); in max9860_hw_params()
410 sysclk |= max9860->psclk; in max9860_hw_params()
412 ret = regmap_write(max9860->regmap, in max9860_hw_params()
419 ret = regmap_write(max9860->regmap, in max9860_hw_params()
425 ret = regmap_write(max9860->regmap, in max9860_hw_params()
434 ret = regmap_update_bits(max9860->regmap, MAX9860_AUDIOCLKHIGH, in max9860_hw_params()
449 struct max9860_priv *max9860 = snd_soc_component_get_drvdata(component); in max9860_set_fmt() local
454 max9860->fmt = fmt; in max9860_set_fmt()
498 struct max9860_priv *max9860 = dev_get_drvdata(component->dev); in max9860_set_bias_level() local
507 ret = regmap_update_bits(max9860->regmap, MAX9860_PWRMAN, in max9860_set_bias_level()
517 ret = regmap_update_bits(max9860->regmap, MAX9860_PWRMAN, in max9860_set_bias_level()
545 struct max9860_priv *max9860 = dev_get_drvdata(dev); in max9860_suspend() local
548 ret = regmap_update_bits(max9860->regmap, MAX9860_SYSCLK, in max9860_suspend()
555 regulator_disable(max9860->dvddio); in max9860_suspend()
562 struct max9860_priv *max9860 = dev_get_drvdata(dev); in max9860_resume() local
565 ret = regulator_enable(max9860->dvddio); in max9860_resume()
571 regcache_cache_only(max9860->regmap, false); in max9860_resume()
572 ret = regcache_sync(max9860->regmap); in max9860_resume()
578 ret = regmap_update_bits(max9860->regmap, MAX9860_SYSCLK, in max9860_resume()
579 MAX9860_PSCLK, max9860->psclk); in max9860_resume()
596 struct max9860_priv *max9860; in max9860_probe() local
603 max9860 = devm_kzalloc(dev, sizeof(struct max9860_priv), GFP_KERNEL); in max9860_probe()
604 if (!max9860) in max9860_probe()
607 max9860->dvddio = devm_regulator_get(dev, "DVDDIO"); in max9860_probe()
608 if (IS_ERR(max9860->dvddio)) in max9860_probe()
609 return dev_err_probe(dev, PTR_ERR(max9860->dvddio), in max9860_probe()
612 max9860->dvddio_nb.notifier_call = max9860_dvddio_event; in max9860_probe()
614 ret = devm_regulator_register_notifier(max9860->dvddio, in max9860_probe()
615 &max9860->dvddio_nb); in max9860_probe()
619 ret = regulator_enable(max9860->dvddio); in max9860_probe()
625 max9860->regmap = devm_regmap_init_i2c(i2c, &max9860_regmap); in max9860_probe()
626 if (IS_ERR(max9860->regmap)) { in max9860_probe()
627 ret = PTR_ERR(max9860->regmap); in max9860_probe()
631 dev_set_drvdata(dev, max9860); in max9860_probe()
656 max9860->psclk = 3; in max9860_probe()
658 max9860->psclk = 2; in max9860_probe()
660 max9860->psclk = 1; in max9860_probe()
661 max9860->pclk_rate = mclk_rate >> (max9860->psclk - 1); in max9860_probe()
662 max9860->psclk <<= MAX9860_PSCLK_SHIFT; in max9860_probe()
663 dev_dbg(dev, "mclk %lu pclk %lu\n", mclk_rate, max9860->pclk_rate); in max9860_probe()
665 regcache_cache_bypass(max9860->regmap, true); in max9860_probe()
667 ret = regmap_write(max9860->regmap, in max9860_probe()
676 regcache_cache_bypass(max9860->regmap, false); in max9860_probe()
678 ret = regmap_read(max9860->regmap, MAX9860_INTRSTATUS, &intr); in max9860_probe()
700 regulator_disable(max9860->dvddio); in max9860_probe()
707 struct max9860_priv *max9860 = dev_get_drvdata(dev); in max9860_remove() local
710 regulator_disable(max9860->dvddio); in max9860_remove()