Lines Matching refs:cs4270
252 struct cs4270_private *cs4270 = snd_soc_component_get_drvdata(component); in cs4270_set_dai_sysclk() local
254 cs4270->mclk = freq; in cs4270_set_dai_sysclk()
275 struct cs4270_private *cs4270 = snd_soc_component_get_drvdata(component); in cs4270_set_dai_fmt() local
281 cs4270->mode = format & SND_SOC_DAIFMT_FORMAT_MASK; in cs4270_set_dai_fmt()
291 cs4270->slave_mode = 1; in cs4270_set_dai_fmt()
294 cs4270->slave_mode = 0; in cs4270_set_dai_fmt()
324 struct cs4270_private *cs4270 = snd_soc_component_get_drvdata(component); in cs4270_hw_params() local
334 ratio = cs4270->mclk / rate; /* MCLK/LRCK ratio */ in cs4270_hw_params()
353 if (cs4270->slave_mode) in cs4270_hw_params()
369 switch (cs4270->mode) { in cs4270_hw_params()
404 struct cs4270_private *cs4270 = snd_soc_component_get_drvdata(component); in cs4270_dai_mute() local
413 reg6 |= cs4270->manual_mute; in cs4270_dai_mute()
437 struct cs4270_private *cs4270 = snd_soc_component_get_drvdata(component); in cs4270_soc_put_mute() local
441 cs4270->manual_mute = (left ? CS4270_MUTE_DAC_A : 0) | in cs4270_soc_put_mute()
502 struct cs4270_private *cs4270 = snd_soc_component_get_drvdata(component); in cs4270_probe() local
528 ret = regulator_bulk_enable(ARRAY_SIZE(cs4270->supplies), in cs4270_probe()
529 cs4270->supplies); in cs4270_probe()
542 struct cs4270_private *cs4270 = snd_soc_component_get_drvdata(component); in cs4270_remove() local
544 regulator_bulk_disable(ARRAY_SIZE(cs4270->supplies), cs4270->supplies); in cs4270_remove()
560 struct cs4270_private *cs4270 = snd_soc_component_get_drvdata(component); in cs4270_soc_suspend() local
571 regulator_bulk_disable(ARRAY_SIZE(cs4270->supplies), in cs4270_soc_suspend()
572 cs4270->supplies); in cs4270_soc_suspend()
579 struct cs4270_private *cs4270 = snd_soc_component_get_drvdata(component); in cs4270_soc_resume() local
582 ret = regulator_bulk_enable(ARRAY_SIZE(cs4270->supplies), in cs4270_soc_resume()
583 cs4270->supplies); in cs4270_soc_resume()
592 regcache_sync(cs4270->regmap); in cs4270_soc_resume()
655 struct cs4270_private *cs4270 = i2c_get_clientdata(i2c_client); in cs4270_i2c_remove() local
657 gpiod_set_value_cansleep(cs4270->reset_gpio, 0); in cs4270_i2c_remove()
669 struct cs4270_private *cs4270; in cs4270_i2c_probe() local
673 cs4270 = devm_kzalloc(&i2c_client->dev, sizeof(struct cs4270_private), in cs4270_i2c_probe()
675 if (!cs4270) in cs4270_i2c_probe()
680 cs4270->supplies[i].supply = supply_names[i]; in cs4270_i2c_probe()
683 ARRAY_SIZE(cs4270->supplies), in cs4270_i2c_probe()
684 cs4270->supplies); in cs4270_i2c_probe()
689 cs4270->reset_gpio = devm_gpiod_get_optional(&i2c_client->dev, "reset", in cs4270_i2c_probe()
691 if (IS_ERR(cs4270->reset_gpio)) { in cs4270_i2c_probe()
693 return PTR_ERR(cs4270->reset_gpio); in cs4270_i2c_probe()
696 if (cs4270->reset_gpio) { in cs4270_i2c_probe()
698 gpiod_set_value_cansleep(cs4270->reset_gpio, 1); in cs4270_i2c_probe()
704 cs4270->regmap = devm_regmap_init_i2c(i2c_client, &cs4270_regmap); in cs4270_i2c_probe()
705 if (IS_ERR(cs4270->regmap)) in cs4270_i2c_probe()
706 return PTR_ERR(cs4270->regmap); in cs4270_i2c_probe()
709 ret = regmap_read(cs4270->regmap, CS4270_CHIPID, &val); in cs4270_i2c_probe()
726 i2c_set_clientdata(i2c_client, cs4270); in cs4270_i2c_probe()