From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756034AbcHVRlV (ORCPT ); Mon, 22 Aug 2016 13:41:21 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:35542 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755893AbcHVRlU (ORCPT ); Mon, 22 Aug 2016 13:41:20 -0400 Date: Mon, 22 Aug 2016 18:41:04 +0100 From: Mark Brown To: Sylwester Nawrocki Cc: Charles Keepax , alsa-devel@alsa-project.org, lee.jones@linaro.org, linux-kernel@vger.kernel.org Message-ID: <20160822174104.GT22076@sirena.org.uk> References: <1471627036-19465-1-git-send-email-s.nawrocki@samsung.com> <20160822092233.GN21682@localhost.localdomain> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="BfbbJsf3thGkpLcA" Content-Disposition: inline In-Reply-To: X-Cookie: Satire is what closes in New Haven. User-Agent: Mutt/1.6.0 (2016-04-01) X-SA-Exim-Connect-IP: 2a01:348:6:8808:fab::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [alsa-devel] [RFC PATCH] mfd: arizona: Add gating of external MCLKn clocks 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 --BfbbJsf3thGkpLcA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 22, 2016 at 07:22:47PM +0200, Sylwester Nawrocki wrote: > I got suggestion from Mark not to request the main MCLK clock > in the machine driver. But even if gating of that clock was > added to the CODEC driver I would need to get hold of it in > the machine driver to get rate of MCLK. So I thought about > exporting a helper from the MFD for requesting MCLK clock or > specifying MCLK clock back in the sound DT node. No, the immediate suggestion is more about the requesting bit than the management bit - once the DT is there it's set in stone. > If we provided an interface like: > struct clk * arizona_get_mclk(struct arizona *arizona, int id); > void arizona_put_mclk(struct clk *clk); > the machine driver would need to get hold of struct arizona*, > which is not that straightforward if we are given on CODEC > of_node (it can be a child of I2S or SPI bus). We could add an interface for the machine driver to retrieve a clock =66rom the CODEC as a transition measure... > Then how about specifying MCLK in the sound node and using > regular devm_clk_get()? This is what we're trying to avoid? --BfbbJsf3thGkpLcA Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJXuzkuAAoJECTWi3JdVIfQ+ogH/RkINbYh1MMX/6ZsDUXWVPwp c7FHVNpWGHqzmO/o461fi+vuM6aaPlhCOH6z9e3I7c2HsUUB5jEGSLZeGnzv2KD5 isdYSgW2R4PKm5TOiOtG+2gDRzgEm7rOIC3mpjTmtcq+F1k2a3zBvkel1is+kjZ5 pmiqwvTRj9HIxJwjSiE9uIig+3cLoMbWHJa/98lZpJckH6KCy//B38DiM8PrJKAf u9s65aMxBqWFK9UPhHX/Wd3VyvhnBAodZVqmhF2L+xIrxM1/OjVC8PCA0h1GAhxn 9K28tJho+HJu/2vZ48ATz0K4m9IQyxE/WieaC/luRzf36wmMsLgRuMNqtXagNpI= =hw3q -----END PGP SIGNATURE----- --BfbbJsf3thGkpLcA--