From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tushar Behera Subject: Re: [PATCH 1/2] ASoC: max98090: Add master clock handling Date: Fri, 23 May 2014 17:06:27 +0530 Message-ID: References: <1400750228-13750-1-git-send-email-tushar.behera@linaro.org> <1400750228-13750-2-git-send-email-tushar.behera@linaro.org> <20140522103039.GD12304@sirena.org.uk> <20140523111446.GA12304@sirena.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: <20140523111446.GA12304-GFdadSzt00ze9xe1eoZjHA@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Mark Brown Cc: Linux-ALSA , lkml , devicetree , Takashi Iwai , Jaroslav Kysela , Doug Anderson , "jerry.wong" List-Id: devicetree@vger.kernel.org On 23 May 2014 16:44, Mark Brown wrote: > On Fri, May 23, 2014 at 11:05:17AM +0530, Tushar Behera wrote: > >> I tested with moving clk_enable/clk_disable calls to set_bias_level(): >> SND_SOC_BIAS_PREPARE. That works well for me. Does it look okay? > >> + if (!IS_ERR(max98090->mclk)) { >> + if (codec->dapm.bias_level == SND_SOC_BIAS_ON) >> + clk_disable(max98090->mclk); >> + else >> + clk_enable(max98090->mclk); >> + } >> break; > > Should be clk_prepare_enable() and similarly for the disable and you > should check the error codes but yes, that looks good. I was planning to keep clk_prepare/clk_unprepare in probe/remove. We are not doing anything specific with the return codes here, so might be I will add only a error message in case enable/disable fails. -- Tushar Behera -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html