From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Ripard Subject: Re: [PATCH 06/14] ASoC: Add sun8i digital audio codec Date: Tue, 4 Oct 2016 18:09:54 +0200 Message-ID: <20161004160954.GN5228@lukather> References: <85cbd9926e52d0aa03f6bbfd8794373d8db491e0.1475571575.git.mylene.josserand@free-electrons.com> <20161004144008.0d07d18c@free-electrons.com> Reply-To: maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="nLMor0SRtNCuLS/8" Return-path: Sender: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Content-Disposition: inline In-Reply-To: <20161004144008.0d07d18c-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: Thomas Petazzoni Cc: =?iso-8859-1?Q?Myl=E8ne?= Josserand , vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org, wens-jdAy2FN1RRM@public.gmane.org, mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org, sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org, lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, perex-/Fr2/VpizcU@public.gmane.org, tiwai-IBi9RG/b67k@public.gmane.org, lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, mark.rutland-5wv7dgnIgG8@public.gmane.org, robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, dmaengine-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org, alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org List-Id: alsa-devel@alsa-project.org --nLMor0SRtNCuLS/8 Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Hi, On Tue, Oct 04, 2016 at 02:40:08PM +0200, Thomas Petazzoni wrote: > > + scodec->clk_apb = devm_clk_get(&pdev->dev, "apb"); > > + if (IS_ERR(scodec->clk_apb)) { > > + dev_err(&pdev->dev, "Failed to get the apb clock\n"); > > + return PTR_ERR(scodec->clk_apb); > > + } > > + if (clk_prepare_enable(scodec->clk_apb)) > > + pr_err("err:open failed;\n"); > > Ditto. + unprepare/disable the previous clock. Ideally, that would be even not be part of the runtime_pm hooks. Ideally, that would be great if that driver supports it. We'll have to go through all the drivers to support it, that would be one less to do (and ASoC makes it very easy, you can have a look at the sun4i-i2s driver). Thanks! Maxime -- Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com --nLMor0SRtNCuLS/8--