Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755963AbdC2LtE (ORCPT ); Wed, 29 Mar 2017 07:49:04 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:56528 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755543AbdC2LsH (ORCPT ); Wed, 29 Mar 2017 07:48:07 -0400 Date: Wed, 29 Mar 2017 12:47:52 +0100 From: Mark Brown To: Daniel Baluta Cc: Charles Keepax , Daniel Baluta , Nicolin Chen , alsa-devel@alsa-project.org, Timur Tabi , Xiubo.Lee@gmail.com, Linux Kernel Mailing List , Liam Girdwood , Takashi Iwai , fabio.estevam@nxp.com, linuxppc-dev@lists.ozlabs.org Message-ID: <20170329114752.bpfzkkvbvan3ayn5@sirena.org.uk> References: <1490691532-2086-1-git-send-email-daniel.baluta@nxp.com> <1490691532-2086-3-git-send-email-daniel.baluta@nxp.com> <20170328092103.GQ6986@localhost.localdomain> <20170328115306.GR6986@localhost.localdomain> <20170328152457.2j5zaxdbdavpuspa@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="vspbhsb2mi47wgbn" Content-Disposition: inline In-Reply-To: X-Cookie: Familiarity breeds attempt. User-Agent: NeoMutt/20161126 (1.7.1) X-SA-Exim-Connect-IP: 2001:470:1f1d:6b5::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [alsa-devel] [PATCH v3 2/2] ASoC: imx-wm8962: Fix codec_clk cleanup X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: No (on mezzanine.sirena.org.uk); Unknown failure Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1525 Lines: 43 --vspbhsb2mi47wgbn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Mar 29, 2017 at 02:38:23PM +0300, Daniel Baluta wrote: > If I read the code correctly, both machine and codec driver are doing: > * codec_clk = clk_get(...) > I guess that the codec driver is the first to be loaded and it will call: > * __clk_create_clk > which will do the allocation. Then when machine driver is loaded, it > will only take a reference to the allocated clock. > I might be very wrong on this. Can you clarify what does moving allocation > of the clock into codec driver implies? Machine driver only needs a reference > to codec_clk to just get the clock's rate. Oh, so the CODEC is already requesting the clock. Then what I'm saying is work out a way to use the handle to the clock that the CODEC driver created. In effect the machine driver is telling the CODEC driver to do things with the input clock. --vspbhsb2mi47wgbn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAljbnucACgkQJNaLcl1U h9DZ6Qf/VAZ2sbMrBxYzJO/3l4uqg/RdBeUQQm5/uC4DM6Uj72lVsDAUJS77YYyH yhBBXX3B95rDnksxd0rJIC6sVlay6XG7wFG85D+Fuz+ZgzOtcQYKS5zEN6+RW17i O2FXmmylr+1+ewxqgdtRqS3ix82wY96+Z1Q+YJlrR7RzcAJQjHss/yILbbOULe4v ox5tI7G5F09NgKkNRslL6RhywqA8l5iT43HWSKwOJMxdKU7xYlPeS+BomZ+ME08e 7Og7Loz/cjumAAJEnr1FKHE2/WG1ku6uOHlcyfYPA/RfPnjBoxLDyJrd+H3DW0ln C/FcExTx1UZPsmTj2gkLSMqp4gxcBw== =9xKi -----END PGP SIGNATURE----- --vspbhsb2mi47wgbn--