Lines Matching +full:vmon +full:- +full:slot +full:- +full:no

1 // SPDX-License-Identifier: GPL-2.0
33 if (tas2780->reset_gpio) { in tas2780_reset()
34 gpiod_set_value_cansleep(tas2780->reset_gpio, 0); in tas2780_reset()
36 gpiod_set_value_cansleep(tas2780->reset_gpio, 1); in tas2780_reset()
40 ret = snd_soc_component_write(tas2780->component, TAS2780_SW_RST, in tas2780_reset()
43 dev_err(tas2780->dev, "%s:errCode:0x%x Reset error!\n", in tas2780_reset()
57 dev_err(tas2780->dev, "%s:errCode:0x%0x:power down error\n", in tas2780_codec_suspend()
62 regcache_cache_only(tas2780->regmap, true); in tas2780_codec_suspend()
63 regcache_mark_dirty(tas2780->regmap); in tas2780_codec_suspend()
78 dev_err(tas2780->dev, "%s:errCode:0x%0x:power down error\n", in tas2780_codec_resume()
82 regcache_cache_only(tas2780->regmap, false); in tas2780_codec_resume()
83 ret = regcache_sync(tas2780->regmap); in tas2780_codec_resume()
114 SND_SOC_DAPM_SIGGEN("VMON"),
125 {"VSENSE", "Switch", "VMON"},
130 struct snd_soc_component *component = dai->component; in tas2780_mute()
139 dev_err(tas2780->dev, "%s: Failed to set powercontrol\n", in tas2780_mute()
150 struct snd_soc_component *component = tas2780->component; in tas2780_set_bitwidth()
180 ret = -EINVAL; in tas2780_set_bitwidth()
184 dev_err(tas2780->dev, "%s:errCode:0x%x set bitwidth error\n", in tas2780_set_bitwidth()
192 dev_err(tas2780->dev, in tas2780_set_bitwidth()
193 "%s:errCode:0x%x set RX slot size error\n", in tas2780_set_bitwidth()
198 val = snd_soc_component_read(tas2780->component, TAS2780_PWR_CTRL); in tas2780_set_bitwidth()
200 dev_err(tas2780->dev, "%s:errCode:0x%x read PWR_CTRL error\n", in tas2780_set_bitwidth()
211 ret = snd_soc_component_update_bits(tas2780->component, in tas2780_set_bitwidth()
214 dev_err(tas2780->dev, "%s:errCode:0x%x enable vSNS error\n", in tas2780_set_bitwidth()
224 ret = snd_soc_component_update_bits(tas2780->component, in tas2780_set_bitwidth()
227 dev_err(tas2780->dev, "%s:errCode:0x%x enable iSNS error\n", in tas2780_set_bitwidth()
239 struct snd_soc_component *component = tas2780->component; in tas2780_set_samplerate()
261 return -EINVAL; in tas2780_set_samplerate()
267 dev_err(tas2780->dev, in tas2780_set_samplerate()
280 struct snd_soc_component *component = dai->component; in tas2780_hw_params()
294 struct snd_soc_component *component = dai->component; in tas2780_set_fmt()
309 dev_err(tas2780->dev, "ASI format Inverse is not found\n"); in tas2780_set_fmt()
310 return -EINVAL; in tas2780_set_fmt()
316 dev_err(tas2780->dev, in tas2780_set_fmt()
335 dev_err(tas2780->dev, in tas2780_set_fmt()
338 ret = -EINVAL; in tas2780_set_fmt()
346 dev_err(tas2780->dev, in tas2780_set_fmt()
355 dev_err(tas2780->dev, "%s:errCode:0x%x Failed to set iface\n", in tas2780_set_fmt()
369 struct snd_soc_component *component = dai->component; in tas2780_set_dai_tdm_slot()
378 return -EINVAL; in tas2780_set_dai_tdm_slot()
390 return -EINVAL; in tas2780_set_dai_tdm_slot()
395 dev_err(tas2780->dev, in tas2780_set_dai_tdm_slot()
412 ret = -EINVAL; in tas2780_set_dai_tdm_slot()
419 dev_err(tas2780->dev, in tas2780_set_dai_tdm_slot()
426 TAS2780_TDM_CFG5_50_MASK, tas2780->v_sense_slot); in tas2780_set_dai_tdm_slot()
428 dev_err(tas2780->dev, in tas2780_set_dai_tdm_slot()
435 TAS2780_TDM_CFG6_50_MASK, tas2780->i_sense_slot); in tas2780_set_dai_tdm_slot()
437 dev_err(tas2780->dev, in tas2780_set_dai_tdm_slot()
490 tas2780->component = component; in tas2780_codec_probe()
497 dev_err(tas2780->dev, "%s:errCode:0x%0x\n", in tas2780_codec_probe()
504 static DECLARE_TLV_DB_SCALE(tas2780_playback_volume, -10000, 50, 0);
569 tas2780->reset_gpio = devm_gpiod_get_optional(tas2780->dev, "reset", in tas2780_parse_dt()
571 if (IS_ERR(tas2780->reset_gpio)) { in tas2780_parse_dt()
572 if (PTR_ERR(tas2780->reset_gpio) == -EPROBE_DEFER) { in tas2780_parse_dt()
573 tas2780->reset_gpio = NULL; in tas2780_parse_dt()
574 return -EPROBE_DEFER; in tas2780_parse_dt()
578 ret = fwnode_property_read_u32(dev->fwnode, "ti,imon-slot-no", in tas2780_parse_dt()
579 &tas2780->i_sense_slot); in tas2780_parse_dt()
581 tas2780->i_sense_slot = 0; in tas2780_parse_dt()
583 ret = fwnode_property_read_u32(dev->fwnode, "ti,vmon-slot-no", in tas2780_parse_dt()
584 &tas2780->v_sense_slot); in tas2780_parse_dt()
586 tas2780->v_sense_slot = 2; in tas2780_parse_dt()
596 tas2780 = devm_kzalloc(&client->dev, sizeof(struct tas2780_priv), in tas2780_i2c_probe()
599 return -ENOMEM; in tas2780_i2c_probe()
600 tas2780->dev = &client->dev; in tas2780_i2c_probe()
602 dev_set_drvdata(&client->dev, tas2780); in tas2780_i2c_probe()
604 tas2780->regmap = devm_regmap_init_i2c(client, &tas2780_i2c_regmap); in tas2780_i2c_probe()
605 if (IS_ERR(tas2780->regmap)) { in tas2780_i2c_probe()
606 result = PTR_ERR(tas2780->regmap); in tas2780_i2c_probe()
607 dev_err(&client->dev, "Failed to allocate register map: %d\n", in tas2780_i2c_probe()
612 if (client->dev.of_node) { in tas2780_i2c_probe()
613 result = tas2780_parse_dt(&client->dev, tas2780); in tas2780_i2c_probe()
615 dev_err(tas2780->dev, in tas2780_i2c_probe()
621 return devm_snd_soc_register_component(tas2780->dev, in tas2780_i2c_probe()
650 MODULE_AUTHOR("Raphael Xu <raphael-xu@ti.com>");