Commit e930bea4 authored by Antoine Gennart's avatar Antoine Gennart Committed by Mark Brown

ASoC: tlv320adc3xxx: BUG: Correct micbias setting

The micbias setting for tlv320adc can also have the value '3' which
means that the micbias ouput pin is connected to the input pin AVDD.
Signed-off-by: default avatarAntoine Gennart <gennartan@disroot.org>
Link: https://lore.kernel.org/r/20230929130117.77661-1-gennartan@disroot.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 892fbdb2
...@@ -293,7 +293,7 @@ ...@@ -293,7 +293,7 @@
#define ADC3XXX_BYPASS_RPGA 0x80 #define ADC3XXX_BYPASS_RPGA 0x80
/* MICBIAS control bits */ /* MICBIAS control bits */
#define ADC3XXX_MICBIAS_MASK 0x2 #define ADC3XXX_MICBIAS_MASK 0x3
#define ADC3XXX_MICBIAS1_SHIFT 5 #define ADC3XXX_MICBIAS1_SHIFT 5
#define ADC3XXX_MICBIAS2_SHIFT 3 #define ADC3XXX_MICBIAS2_SHIFT 3
...@@ -1099,7 +1099,7 @@ static int adc3xxx_parse_dt_micbias(struct adc3xxx *adc3xxx, ...@@ -1099,7 +1099,7 @@ static int adc3xxx_parse_dt_micbias(struct adc3xxx *adc3xxx,
unsigned int val; unsigned int val;
if (!of_property_read_u32(np, propname, &val)) { if (!of_property_read_u32(np, propname, &val)) {
if (val >= ADC3XXX_MICBIAS_AVDD) { if (val > ADC3XXX_MICBIAS_AVDD) {
dev_err(dev, "Invalid property value for '%s'\n", propname); dev_err(dev, "Invalid property value for '%s'\n", propname);
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment