Lines Matching +full:current +full:- +full:sense
1 // SPDX-License-Identifier: GPL-2.0-only
137 /* The datasheet states that soft reset register is read-only, in ssm4567_writeable_reg()
138 * but logically it is write-only. */ in ssm4567_writeable_reg()
158 static const DECLARE_TLV_DB_MINMAX_MUTE(ssm4567_vol_tlv, -7125, 2400);
176 SND_SOC_DAPM_SIGGEN("Sense"),
178 SND_SOC_DAPM_PGA("Current Sense", SSM4567_REG_POWER_CTRL, 4, 1, NULL, 0),
179 SND_SOC_DAPM_PGA("Voltage Sense", SSM4567_REG_POWER_CTRL, 5, 1, NULL, 0),
180 SND_SOC_DAPM_PGA("VBAT Sense", SSM4567_REG_POWER_CTRL, 6, 1, NULL, 0),
190 { "Current Sense", NULL, "Sense" },
191 { "Voltage Sense", NULL, "Sense" },
192 { "VBAT Sense", NULL, "Sense" },
193 { "Capture Sense", NULL, "Current Sense" },
194 { "Capture Sense", NULL, "Voltage Sense" },
195 { "Capture Sense", NULL, "VBAT Sense" },
201 struct snd_soc_component *component = dai->component; in ssm4567_hw_params()
217 return -EINVAL; in ssm4567_hw_params()
219 return regmap_update_bits(ssm4567->regmap, SSM4567_REG_DAC_CTRL, in ssm4567_hw_params()
225 struct ssm4567 *ssm4567 = snd_soc_component_get_drvdata(dai->component); in ssm4567_mute()
229 return regmap_update_bits(ssm4567->regmap, SSM4567_REG_DAC_CTRL, in ssm4567_mute()
242 return -EINVAL; in ssm4567_set_tdm_slot()
245 return -EINVAL; in ssm4567_set_tdm_slot()
249 return -EINVAL; in ssm4567_set_tdm_slot()
262 return -EINVAL; in ssm4567_set_tdm_slot()
265 ret = regmap_update_bits(ssm4567->regmap, SSM4567_REG_SAI_CTRL_2, in ssm4567_set_tdm_slot()
271 return regmap_update_bits(ssm4567->regmap, SSM4567_REG_SAI_CTRL_1, in ssm4567_set_tdm_slot()
285 return -EINVAL; in ssm4567_set_dai_fmt()
305 return -EINVAL; in ssm4567_set_dai_fmt()
325 return -EINVAL; in ssm4567_set_dai_fmt()
331 return regmap_update_bits(ssm4567->regmap, SSM4567_REG_SAI_CTRL_1, in ssm4567_set_dai_fmt()
345 ret = regmap_update_bits(ssm4567->regmap, in ssm4567_set_power()
348 regcache_mark_dirty(ssm4567->regmap); in ssm4567_set_power()
351 regcache_cache_only(ssm4567->regmap, !enable); in ssm4567_set_power()
354 ret = regmap_write(ssm4567->regmap, SSM4567_REG_SOFT_RESET, in ssm4567_set_power()
359 ret = regmap_update_bits(ssm4567->regmap, in ssm4567_set_power()
362 regcache_sync(ssm4567->regmap); in ssm4567_set_power()
400 .name = "ssm4567-hifi",
410 .stream_name = "Capture Sense",
451 ssm4567 = devm_kzalloc(&i2c->dev, sizeof(*ssm4567), GFP_KERNEL); in ssm4567_i2c_probe()
453 return -ENOMEM; in ssm4567_i2c_probe()
457 ssm4567->regmap = devm_regmap_init_i2c(i2c, &ssm4567_regmap_config); in ssm4567_i2c_probe()
458 if (IS_ERR(ssm4567->regmap)) in ssm4567_i2c_probe()
459 return PTR_ERR(ssm4567->regmap); in ssm4567_i2c_probe()
461 ret = regmap_write(ssm4567->regmap, SSM4567_REG_SOFT_RESET, 0x00); in ssm4567_i2c_probe()
469 return devm_snd_soc_register_component(&i2c->dev, &ssm4567_component_driver, in ssm4567_i2c_probe()