Lines Matching refs:cs4349
78 struct cs4349_private *cs4349 = snd_soc_codec_get_drvdata(codec); in cs4349_set_dai_fmt() local
87 cs4349->mode = format & SND_SOC_DAIFMT_FORMAT_MASK; in cs4349_set_dai_fmt()
101 struct cs4349_private *cs4349 = snd_soc_codec_get_drvdata(codec); in cs4349_pcm_hw_params() local
104 cs4349->rate = params_rate(params); in cs4349_pcm_hw_params()
106 switch (cs4349->mode) { in cs4349_pcm_hw_params()
283 struct cs4349_private *cs4349; in cs4349_i2c_probe() local
286 cs4349 = devm_kzalloc(&client->dev, sizeof(*cs4349), GFP_KERNEL); in cs4349_i2c_probe()
287 if (!cs4349) in cs4349_i2c_probe()
290 cs4349->regmap = devm_regmap_init_i2c(client, &cs4349_regmap); in cs4349_i2c_probe()
291 if (IS_ERR(cs4349->regmap)) { in cs4349_i2c_probe()
292 ret = PTR_ERR(cs4349->regmap); in cs4349_i2c_probe()
298 cs4349->reset_gpio = devm_gpiod_get_optional(&client->dev, in cs4349_i2c_probe()
300 if (IS_ERR(cs4349->reset_gpio)) in cs4349_i2c_probe()
301 return PTR_ERR(cs4349->reset_gpio); in cs4349_i2c_probe()
303 gpiod_set_value_cansleep(cs4349->reset_gpio, 1); in cs4349_i2c_probe()
305 i2c_set_clientdata(client, cs4349); in cs4349_i2c_probe()
313 struct cs4349_private *cs4349 = i2c_get_clientdata(client); in cs4349_i2c_remove() local
318 gpiod_set_value_cansleep(cs4349->reset_gpio, 0); in cs4349_i2c_remove()
326 struct cs4349_private *cs4349 = dev_get_drvdata(dev); in cs4349_runtime_suspend() local
329 ret = regmap_update_bits(cs4349->regmap, CS4349_MISC, PWR_DWN, PWR_DWN); in cs4349_runtime_suspend()
333 regcache_cache_only(cs4349->regmap, true); in cs4349_runtime_suspend()
336 gpiod_set_value_cansleep(cs4349->reset_gpio, 0); in cs4349_runtime_suspend()
343 struct cs4349_private *cs4349 = dev_get_drvdata(dev); in cs4349_runtime_resume() local
346 ret = regmap_update_bits(cs4349->regmap, CS4349_MISC, PWR_DWN, 0); in cs4349_runtime_resume()
350 gpiod_set_value_cansleep(cs4349->reset_gpio, 1); in cs4349_runtime_resume()
352 regcache_cache_only(cs4349->regmap, false); in cs4349_runtime_resume()
353 regcache_sync(cs4349->regmap); in cs4349_runtime_resume()