From: "Andrew F. Davis" <afd@ti.com>
To: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>
Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org, "Andrew F . Davis" <afd@ti.com>
Subject: [PATCH] ASoC: tlv320aic31xx: Add MICBIAS off setting
Date: Fri, 31 Aug 2018 13:05:07 -0500 [thread overview]
Message-ID: <20180831180507.28867-1-afd@ti.com> (raw)
Leaving microphone bias off is a valid setting and even used in the DT
binding document example. Add this setting here and document the same.
Although it may not make much sense to enable a microphone here without
any bias, it is a valid setting that can be chosen by DT and may be
needed for some boards.
Signed-off-by: Andrew F. Davis <afd@ti.com>
Acked-by: Rob Herring <robh@kernel.org>
---
Documentation/devicetree/bindings/sound/tlv320aic31xx.txt | 1 +
include/dt-bindings/sound/tlv320aic31xx-micbias.h | 1 +
sound/soc/codecs/tlv320aic31xx.c | 1 +
3 files changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/sound/tlv320aic31xx.txt b/Documentation/devicetree/bindings/sound/tlv320aic31xx.txt
index 5b3c33bb99e5..411cc46a2c58 100644
--- a/Documentation/devicetree/bindings/sound/tlv320aic31xx.txt
+++ b/Documentation/devicetree/bindings/sound/tlv320aic31xx.txt
@@ -24,6 +24,7 @@ Optional properties:
- reset-gpios - GPIO specification for the active low RESET input.
- ai31xx-micbias-vg - MicBias Voltage setting
+ 0 or MICBIAS_OFF - MICBIAS output is powered off
1 or MICBIAS_2_0V - MICBIAS output is powered to 2.0V
2 or MICBIAS_2_5V - MICBIAS output is powered to 2.5V
3 or MICBIAS_AVDD - MICBIAS output is connected to AVDD
diff --git a/include/dt-bindings/sound/tlv320aic31xx-micbias.h b/include/dt-bindings/sound/tlv320aic31xx-micbias.h
index c6895a18a455..069484070fcf 100644
--- a/include/dt-bindings/sound/tlv320aic31xx-micbias.h
+++ b/include/dt-bindings/sound/tlv320aic31xx-micbias.h
@@ -2,6 +2,7 @@
#ifndef __DT_TLV320AIC31XX_MICBIAS_H
#define __DT_TLV320AIC31XX_MICBIAS_H
+#define MICBIAS_OFF 0
#define MICBIAS_2_0V 1
#define MICBIAS_2_5V 2
#define MICBIAS_AVDDV 3
diff --git a/sound/soc/codecs/tlv320aic31xx.c b/sound/soc/codecs/tlv320aic31xx.c
index bf92d36b8f8a..7d87df518fed 100644
--- a/sound/soc/codecs/tlv320aic31xx.c
+++ b/sound/soc/codecs/tlv320aic31xx.c
@@ -1421,6 +1421,7 @@ static int aic31xx_i2c_probe(struct i2c_client *i2c,
fwnode_property_read_u32(aic31xx->dev->fwnode, "ai31xx-micbias-vg",
&micbias_value);
switch (micbias_value) {
+ case MICBIAS_OFF:
case MICBIAS_2_0V:
case MICBIAS_2_5V:
case MICBIAS_AVDDV:
--
2.18.0
WARNING: multiple messages have this Message-ID (diff)
From: "Andrew F. Davis" <afd@ti.com>
To: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>
Cc: <alsa-devel@alsa-project.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, "Andrew F . Davis" <afd@ti.com>
Subject: [PATCH] ASoC: tlv320aic31xx: Add MICBIAS off setting
Date: Fri, 31 Aug 2018 13:05:07 -0500 [thread overview]
Message-ID: <20180831180507.28867-1-afd@ti.com> (raw)
Leaving microphone bias off is a valid setting and even used in the DT
binding document example. Add this setting here and document the same.
Although it may not make much sense to enable a microphone here without
any bias, it is a valid setting that can be chosen by DT and may be
needed for some boards.
Signed-off-by: Andrew F. Davis <afd@ti.com>
Acked-by: Rob Herring <robh@kernel.org>
---
Documentation/devicetree/bindings/sound/tlv320aic31xx.txt | 1 +
include/dt-bindings/sound/tlv320aic31xx-micbias.h | 1 +
sound/soc/codecs/tlv320aic31xx.c | 1 +
3 files changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/sound/tlv320aic31xx.txt b/Documentation/devicetree/bindings/sound/tlv320aic31xx.txt
index 5b3c33bb99e5..411cc46a2c58 100644
--- a/Documentation/devicetree/bindings/sound/tlv320aic31xx.txt
+++ b/Documentation/devicetree/bindings/sound/tlv320aic31xx.txt
@@ -24,6 +24,7 @@ Optional properties:
- reset-gpios - GPIO specification for the active low RESET input.
- ai31xx-micbias-vg - MicBias Voltage setting
+ 0 or MICBIAS_OFF - MICBIAS output is powered off
1 or MICBIAS_2_0V - MICBIAS output is powered to 2.0V
2 or MICBIAS_2_5V - MICBIAS output is powered to 2.5V
3 or MICBIAS_AVDD - MICBIAS output is connected to AVDD
diff --git a/include/dt-bindings/sound/tlv320aic31xx-micbias.h b/include/dt-bindings/sound/tlv320aic31xx-micbias.h
index c6895a18a455..069484070fcf 100644
--- a/include/dt-bindings/sound/tlv320aic31xx-micbias.h
+++ b/include/dt-bindings/sound/tlv320aic31xx-micbias.h
@@ -2,6 +2,7 @@
#ifndef __DT_TLV320AIC31XX_MICBIAS_H
#define __DT_TLV320AIC31XX_MICBIAS_H
+#define MICBIAS_OFF 0
#define MICBIAS_2_0V 1
#define MICBIAS_2_5V 2
#define MICBIAS_AVDDV 3
diff --git a/sound/soc/codecs/tlv320aic31xx.c b/sound/soc/codecs/tlv320aic31xx.c
index bf92d36b8f8a..7d87df518fed 100644
--- a/sound/soc/codecs/tlv320aic31xx.c
+++ b/sound/soc/codecs/tlv320aic31xx.c
@@ -1421,6 +1421,7 @@ static int aic31xx_i2c_probe(struct i2c_client *i2c,
fwnode_property_read_u32(aic31xx->dev->fwnode, "ai31xx-micbias-vg",
&micbias_value);
switch (micbias_value) {
+ case MICBIAS_OFF:
case MICBIAS_2_0V:
case MICBIAS_2_5V:
case MICBIAS_AVDDV:
--
2.18.0
next reply other threads:[~2018-08-31 18:05 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-31 18:05 Andrew F. Davis [this message]
2018-08-31 18:05 ` [PATCH] ASoC: tlv320aic31xx: Add MICBIAS off setting Andrew F. Davis
2018-09-03 11:26 ` Mark Brown
2018-09-03 11:26 ` Mark Brown
2018-09-04 13:55 ` Andrew F. Davis
2018-09-04 13:55 ` Andrew F. Davis
2018-09-04 14:41 ` Mark Brown
2018-09-04 14:41 ` Mark Brown
2018-09-04 14:43 ` Andrew F. Davis
2018-09-04 14:43 ` Andrew F. Davis
2018-09-04 14:55 ` Mark Brown
2018-09-04 14:55 ` Mark Brown
2018-09-04 15:10 ` Andrew F. Davis
2018-09-04 15:10 ` Andrew F. Davis
2018-09-04 15:56 ` Mark Brown
2018-09-04 16:02 ` Andrew F. Davis
2018-09-04 16:02 ` Andrew F. Davis
2018-09-04 16:21 ` Mark Brown
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=20180831180507.28867-1-afd@ti.com \
--to=afd@ti.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.