linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Murphy <dmurphy@ti.com>
To: <lgirdwood@gmail.com>, <broonie@kernel.org>, <perex@perex.cz>,
	<tiwai@suse.com>
Cc: <alsa-devel@alsa-project.org>, <linux-kernel@vger.kernel.org>,
	Dan Murphy <dmurphy@ti.com>, Ricard Wanderlof <ricardw@axis.com>
Subject: [PATCH for-next] ASoC: tlv320adcx140: Fix MIC_BIAS defines for ADC full scale
Date: Wed, 26 Feb 2020 07:34:39 -0600	[thread overview]
Message-ID: <20200226133439.15837-1-dmurphy@ti.com> (raw)

Change the #defines for the ADC full scale bits from MIC_BIAS to
ADC_FSCALE.  This also changes the error message to incidate ADC full
scale value error as opposed to the Mic bias.

Reported-by: Ricard Wanderlof <ricardw@axis.com>
Signed-off-by: Dan Murphy <dmurphy@ti.com>
---
 sound/soc/codecs/tlv320adcx140.c | 12 ++++++------
 sound/soc/codecs/tlv320adcx140.h |  8 ++++----
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/sound/soc/codecs/tlv320adcx140.c b/sound/soc/codecs/tlv320adcx140.c
index 93a0cb8e662c..825ace9b5fa7 100644
--- a/sound/soc/codecs/tlv320adcx140.c
+++ b/sound/soc/codecs/tlv320adcx140.c
@@ -758,12 +758,12 @@ static int adcx140_codec_probe(struct snd_soc_component *component)
 	ret = device_property_read_u8(adcx140->dev, "ti,vref-source",
 				      &vref_source);
 	if (ret)
-		vref_source = ADCX140_MIC_BIAS_VREF_275V;
+		vref_source = ADCX140_ADC_FSCALE_VREF_275V;
 
-	if (vref_source != ADCX140_MIC_BIAS_VREF_275V &&
-	    vref_source != ADCX140_MIC_BIAS_VREF_25V &&
-	    vref_source != ADCX140_MIC_BIAS_VREF_1375V) {
-		dev_err(adcx140->dev, "Mic Bias source value is invalid\n");
+	if (vref_source != ADCX140_ADC_FSCALE_VREF_275V &&
+	    vref_source != ADCX140_ADC_FSCALE_VREF_25V &&
+	    vref_source != ADCX140_ADC_FSCALE_VREF_1375V) {
+		dev_err(adcx140->dev, "ADC full scale setting is invalid\n");
 		return -EINVAL;
 	}
 
@@ -787,7 +787,7 @@ static int adcx140_codec_probe(struct snd_soc_component *component)
 
 	ret = regmap_update_bits(adcx140->regmap, ADCX140_BIAS_CFG,
 				ADCX140_MIC_BIAS_VAL_MSK |
-				ADCX140_MIC_BIAS_VREF_MSK, bias_source);
+				ADCX140_ADC_FSCALE_VREF_MSK, bias_source);
 	if (ret)
 		dev_err(adcx140->dev, "setting MIC bias failed %d\n", ret);
 out:
diff --git a/sound/soc/codecs/tlv320adcx140.h b/sound/soc/codecs/tlv320adcx140.h
index 6d055e55909e..adb9513900b1 100644
--- a/sound/soc/codecs/tlv320adcx140.h
+++ b/sound/soc/codecs/tlv320adcx140.h
@@ -117,10 +117,10 @@
 #define ADCX140_MIC_BIAS_VAL_AVDD	6
 #define ADCX140_MIC_BIAS_VAL_MSK GENMASK(6, 4)
 
-#define ADCX140_MIC_BIAS_VREF_275V	0
-#define ADCX140_MIC_BIAS_VREF_25V	1
-#define ADCX140_MIC_BIAS_VREF_1375V	2
-#define ADCX140_MIC_BIAS_VREF_MSK GENMASK(1, 0)
+#define ADCX140_ADC_FSCALE_VREF_275V	0
+#define ADCX140_ADC_FSCALE_VREF_25V	1
+#define ADCX140_ADC_FSCALE_VREF_1375V	2
+#define ADCX140_ADC_FSCALE_VREF_MSK GENMASK(1, 0)
 
 #define ADCX140_PWR_CFG_BIAS_PDZ	BIT(7)
 #define ADCX140_PWR_CFG_ADC_PDZ		BIT(6)
-- 
2.25.0


             reply	other threads:[~2020-02-26 13:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-26 13:34 Dan Murphy [this message]
2020-02-27  8:07 ` [PATCH for-next] ASoC: tlv320adcx140: Fix MIC_BIAS defines for ADC full scale Ricard Wanderlof

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200226133439.15837-1-dmurphy@ti.com \
    --to=dmurphy@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=ricardw@axis.com \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).