From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yang Fang Subject: Re: [PATCH 1/3] ASoC: max98090: read micbias from device property Date: Wed, 27 May 2015 10:26:48 -0700 Message-ID: <20150527172648.GA16313@mocha> References: <1432684686-14460-1-git-send-email-yang.a.fang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by alsa0.perex.cz (Postfix) with ESMTP id B68BA265E24 for ; Wed, 27 May 2015 19:27:33 +0200 (CEST) Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Dylan Reid Cc: "alsa-devel@alsa-project.org" , "Sripathi, Srinivas" , Praveen K Jain , Liam Girdwood , Denny Iriawan , Mark Brown , "Nujella, Sathyanarayana" , kevin.strasser@linux.intel.com List-Id: alsa-devel@alsa-project.org On Tue, May 26, 2015 at 09:39:54PM -0700, Dylan Reid wrote: > On Tue, May 26, 2015 at 4:58 PM, wrote: > > From: "Fang, Yang A" > > > > This patch reads max98090 micbias from acpi or dt > > > > Signed-off-by: Fang, Yang A > > --- > > 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); > > Should this be "maxim,micbias" to be consistent with "maxim,dmic-freq"? > It should also be added to the Documentation for the max98090, as an > optional parameter. Agreed . i will change it in v2 and update the Documentation > > > + > > Extra newline. will fix in v2 > > > + if (err) > > + micbias = M98090_MBVSEL_2V8; > > + > > snd_soc_update_bits(codec, M98090_REG_MIC_BIAS_VOLTAGE, > > - M98090_MBVSEL_MASK, M98090_MBVSEL_2V8); > > + M98090_MBVSEL_MASK, micbias); > > > > max98090_add_widgets(codec); > > > > -- > > 1.7.9.5 > >