summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/tlv320adcx140.c
diff options
context:
space:
mode:
authorDan Murphy <dmurphy@ti.com>2020-09-15 22:06:04 +0300
committerMark Brown <broonie@kernel.org>2020-09-17 19:40:10 +0300
commit42d5031d3ee858bc14df704439eefdbf38b8f628 (patch)
treeb982c6b156e333473647d33e9f86e5dfe5fb6a59 /sound/soc/codecs/tlv320adcx140.c
parentdcde34c47d8f7befc647fda65e8efa8cc0e795ca (diff)
downloadlinux-42d5031d3ee858bc14df704439eefdbf38b8f628.tar.xz
ASoC: tlv320adcx140: Add the config to configure Tx ASI output
Add code to allow the ASI Tx output to be placed into High-z mode during unused ASI cycles. This allows for other devices that may be on the bus to drive the ASI out. By default the 320adcx140 sends 0's for unused cycles. Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200915190606.1744-4-dmurphy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/tlv320adcx140.c')
-rw-r--r--sound/soc/codecs/tlv320adcx140.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/soc/codecs/tlv320adcx140.c b/sound/soc/codecs/tlv320adcx140.c
index cf5cbe314f7e..28dbd7d5e149 100644
--- a/sound/soc/codecs/tlv320adcx140.c
+++ b/sound/soc/codecs/tlv320adcx140.c
@@ -876,6 +876,7 @@ static int adcx140_codec_probe(struct snd_soc_component *component)
u32 gpi_input_val = 0;
int i;
int ret;
+ bool tx_high_z;
ret = device_property_read_u32(adcx140->dev, "ti,mic-bias-source",
&bias_source);
@@ -967,6 +968,16 @@ static int adcx140_codec_probe(struct snd_soc_component *component)
if (ret)
dev_err(adcx140->dev, "setting MIC bias failed %d\n", ret);
+ tx_high_z = device_property_read_bool(adcx140->dev, "ti,asi-tx-drive");
+ if (tx_high_z) {
+ ret = regmap_update_bits(adcx140->regmap, ADCX140_ASI_CFG0,
+ ADCX140_TX_FILL, ADCX140_TX_FILL);
+ if (ret) {
+ dev_err(adcx140->dev, "Setting Tx drive failed %d\n", ret);
+ goto out;
+ }
+ }
+
adcx140_pwr_ctrl(adcx140, true);
out:
return ret;