Re: [alsa-devel] [PATCH 1/3] ASoC: max98090: read micbias from device property
From: "Fang, Yang A" yang.a.fang@intel.com
This patch reads max98090 micbias from acpi or dt
Signed-off-by: Fang, Yang A yang.a.fang@intel.com
sound/soc/codecs/max98090.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c index c230626..27df17e 100644 --- a/sound/soc/codecs/max98090.c +++ b/sound/soc/codecs/max98090.c @@ -2419,6 +2419,8 @@ static int max98090_probe(struct snd_soc_codec *codec) struct max98090_cdata *cdata; enum max98090_type devtype; int ret = 0;
- int err;
- unsigned int micbias;
dev_dbg(codec->dev, "max98090_probe\n");
@@ -2503,8 +2505,13 @@ static int max98090_probe(struct snd_soc_codec *codec) snd_soc_write(codec, M98090_REG_BIAS_CONTROL, M98090_VCM_MODE_MASK);
- err = device_property_read_u32(codec->dev, "max,micbias", &micbias);
if (err || micbias < M98090_MBVSEL_2V2 || micbias > M98090_MBVSEL_2V8) micbias = M98090_MBVSEL_2V8; Just stick sanity as well.
On Wed, May 27, 2015 at 02:35:40PM -0700, Anish Kumar wrote:
From: "Fang, Yang A" yang.a.fang@intel.com
This patch reads max98090 micbias from acpi or dt
Signed-off-by: Fang, Yang A yang.a.fang@intel.com
sound/soc/codecs/max98090.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c index c230626..27df17e 100644 --- a/sound/soc/codecs/max98090.c +++ b/sound/soc/codecs/max98090.c @@ -2419,6 +2419,8 @@ static int max98090_probe(struct snd_soc_codec *codec) struct max98090_cdata *cdata; enum max98090_type devtype; int ret = 0;
- int err;
- unsigned int micbias;
dev_dbg(codec->dev, "max98090_probe\n");
@@ -2503,8 +2505,13 @@ static int max98090_probe(struct snd_soc_codec *codec) snd_soc_write(codec, M98090_REG_BIAS_CONTROL, M98090_VCM_MODE_MASK);
- err = device_property_read_u32(codec->dev, "max,micbias", &micbias);
if (err || micbias < M98090_MBVSEL_2V2 || micbias > M98090_MBVSEL_2V8)
micbias = M98090_MBVSEL_2V8; Just stick sanity as well.
thanks.will include in v2. waiting for more comments
participants (2)
-
Anish Kumar
-
Yang Fang