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

1 // SPDX-License-Identifier: GPL-2.0
35 if (tas2780->reset_gpio) { in tas2780_reset()
36 gpiod_set_value_cansleep(tas2780->reset_gpio, 0); in tas2780_reset()
38 gpiod_set_value_cansleep(tas2780->reset_gpio, 1); in tas2780_reset()
42 snd_soc_component_write(tas2780->component, TAS2780_SW_RST, in tas2780_reset()
45 dev_err(tas2780->dev, "%s:errCode:0x%x Reset error!\n", in tas2780_reset()
59 dev_err(tas2780->dev, "%s:errCode:0x%0x:power down error\n", in tas2780_codec_suspend()
64 regcache_cache_only(tas2780->regmap, true); in tas2780_codec_suspend()
65 regcache_mark_dirty(tas2780->regmap); in tas2780_codec_suspend()
80 dev_err(tas2780->dev, "%s:errCode:0x%0x:power down error\n", in tas2780_codec_resume()
85 regcache_cache_only(tas2780->regmap, false); in tas2780_codec_resume()
86 ret = regcache_sync(tas2780->regmap); in tas2780_codec_resume()
117 SND_SOC_DAPM_SIGGEN("VMON"),
128 {"VSENSE", "Switch", "VMON"},
133 struct snd_soc_component *component = dai->component; in tas2780_mute()
142 dev_err(tas2780->dev, "%s: Failed to set powercontrol\n", in tas2780_mute()
153 struct snd_soc_component *component = tas2780->component; in tas2780_set_bitwidth()
183 ret = -EINVAL; in tas2780_set_bitwidth()
187 dev_err(tas2780->dev, "%s:errCode:0x%x set bitwidth error\n", in tas2780_set_bitwidth()
195 dev_err(tas2780->dev, in tas2780_set_bitwidth()
196 "%s:errCode:0x%x set RX slot size error\n", in tas2780_set_bitwidth()
201 val = snd_soc_component_read(tas2780->component, TAS2780_PWR_CTRL); in tas2780_set_bitwidth()
203 dev_err(tas2780->dev, "%s:errCode:0x%x read PWR_CTRL error\n", in tas2780_set_bitwidth()
214 ret = snd_soc_component_update_bits(tas2780->component, in tas2780_set_bitwidth()
217 dev_err(tas2780->dev, "%s:errCode:0x%x enable vSNS error\n", in tas2780_set_bitwidth()
227 ret = snd_soc_component_update_bits(tas2780->component, in tas2780_set_bitwidth()
230 dev_err(tas2780->dev, "%s:errCode:0x%x enable iSNS error\n", in tas2780_set_bitwidth()
242 struct snd_soc_component *component = tas2780->component; in tas2780_set_samplerate()
264 return -EINVAL; in tas2780_set_samplerate()
270 dev_err(tas2780->dev, in tas2780_set_samplerate()
283 struct snd_soc_component *component = dai->component; in tas2780_hw_params()
297 struct snd_soc_component *component = dai->component; in tas2780_set_fmt()
312 dev_err(tas2780->dev, "ASI format Inverse is not found\n"); in tas2780_set_fmt()
313 return -EINVAL; in tas2780_set_fmt()
319 dev_err(tas2780->dev, in tas2780_set_fmt()
338 dev_err(tas2780->dev, in tas2780_set_fmt()
341 ret = -EINVAL; in tas2780_set_fmt()
349 dev_err(tas2780->dev, in tas2780_set_fmt()
358 dev_err(tas2780->dev, "%s:errCode:0x%x Failed to set iface\n", in tas2780_set_fmt()
372 struct snd_soc_component *component = dai->component; in tas2780_set_dai_tdm_slot()
381 return -EINVAL; in tas2780_set_dai_tdm_slot()
393 return -EINVAL; in tas2780_set_dai_tdm_slot()
398 dev_err(tas2780->dev, in tas2780_set_dai_tdm_slot()
415 ret = -EINVAL; in tas2780_set_dai_tdm_slot()
422 dev_err(tas2780->dev, in tas2780_set_dai_tdm_slot()
429 TAS2780_TDM_CFG5_50_MASK, tas2780->v_sense_slot); in tas2780_set_dai_tdm_slot()
431 dev_err(tas2780->dev, in tas2780_set_dai_tdm_slot()
438 TAS2780_TDM_CFG6_50_MASK, tas2780->i_sense_slot); in tas2780_set_dai_tdm_slot()
440 dev_err(tas2780->dev, in tas2780_set_dai_tdm_slot()
493 tas2780->component = component; in tas2780_codec_probe()
500 dev_err(tas2780->dev, "%s:errCode:0x%0x\n", in tas2780_codec_probe()
507 static DECLARE_TLV_DB_SCALE(tas2780_playback_volume, -10000, 50, 0);
572 tas2780->reset_gpio = devm_gpiod_get_optional(tas2780->dev, "reset", in tas2780_parse_dt()
574 if (IS_ERR(tas2780->reset_gpio)) { in tas2780_parse_dt()
575 if (PTR_ERR(tas2780->reset_gpio) == -EPROBE_DEFER) { in tas2780_parse_dt()
576 tas2780->reset_gpio = NULL; in tas2780_parse_dt()
577 return -EPROBE_DEFER; in tas2780_parse_dt()
581 ret = fwnode_property_read_u32(dev->fwnode, "ti,imon-slot-no", in tas2780_parse_dt()
582 &tas2780->i_sense_slot); in tas2780_parse_dt()
584 tas2780->i_sense_slot = 0; in tas2780_parse_dt()
586 ret = fwnode_property_read_u32(dev->fwnode, "ti,vmon-slot-no", in tas2780_parse_dt()
587 &tas2780->v_sense_slot); in tas2780_parse_dt()
589 tas2780->v_sense_slot = 2; in tas2780_parse_dt()
600 tas2780 = devm_kzalloc(&client->dev, sizeof(struct tas2780_priv), in tas2780_i2c_probe()
603 return -ENOMEM; in tas2780_i2c_probe()
604 tas2780->dev = &client->dev; in tas2780_i2c_probe()
606 dev_set_drvdata(&client->dev, tas2780); in tas2780_i2c_probe()
608 tas2780->regmap = devm_regmap_init_i2c(client, &tas2780_i2c_regmap); in tas2780_i2c_probe()
609 if (IS_ERR(tas2780->regmap)) { in tas2780_i2c_probe()
610 result = PTR_ERR(tas2780->regmap); in tas2780_i2c_probe()
611 dev_err(&client->dev, "Failed to allocate register map: %d\n", in tas2780_i2c_probe()
616 if (client->dev.of_node) { in tas2780_i2c_probe()
617 result = tas2780_parse_dt(&client->dev, tas2780); in tas2780_i2c_probe()
619 dev_err(tas2780->dev, in tas2780_i2c_probe()
625 return devm_snd_soc_register_component(tas2780->dev, in tas2780_i2c_probe()
654 MODULE_AUTHOR("Raphael Xu <raphael-xu@ti.com>");