Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966460AbbBCQWx (ORCPT ); Tue, 3 Feb 2015 11:22:53 -0500 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:49315 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755993AbbBCQWr (ORCPT ); Tue, 3 Feb 2015 11:22:47 -0500 Date: Tue, 3 Feb 2015 16:21:28 +0000 From: Mark Brown To: Manuel Lauss Cc: Bo Shen , Manuel Lauss , Liam Girdwood , Richard Purdie , patches@opensource.wolfsonmicro.com, linux-sound@vger.kernel.org, alsa-devel , linux-arm-kernel@lists.infradead.org, LKML Message-ID: <20150203162128.GP21293@sirena.org.uk> References: <1422934415-24957-1-git-send-email-voice.shen@atmel.com> <20150203124441.GK21293@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="6N0KlctTh4dwosRA" Content-Disposition: inline In-Reply-To: X-Cookie: My LESLIE GORE record is BROKEN ... User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: 94.175.94.161 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [RFC PATCH] ASoC: wm8731: let codec to manage clock by itself X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1959 Lines: 49 --6N0KlctTh4dwosRA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Feb 03, 2015 at 03:40:45PM +0100, Manuel Lauss wrote: > On Tue, Feb 3, 2015 at 1:44 PM, Mark Brown wrote: > >> + wm8731->mclk = devm_clk_get(&spi->dev, "mclk"); > >> + if (IS_ERR(wm8731->mclk)) { > >> + wm8731->mclk = NULL; > >> + dev_warn(&spi->dev, "assuming static MCLK\n"); > >> + } > > This is broken for both deferred probe and in the case where the clock > > API genuinely returns a NULL clock. Other than that it's the kind of > > thing that we've done for some other drivers, though it's not good to > > have to do this. Check them for correct behaviour. > Hm, so the only option is to create the simples possible 12MHz clk object? Well, that's the best option in general. You can get away with just making sure that -EPROBE_DEFER is handled and that IS_ERR() is used to check for an invalid clock but if you can define a clock that's even better (and should be pretty painless), we're going to want to do that transition at some point. --6N0KlctTh4dwosRA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJU0PWHAAoJECTWi3JdVIfQ04QH/jbACrSSpMvI16Nvv/qkyZn7 0YKsObUq85akkoO3SMdRnHIr4HOqgtywq2Z8J+wl4tBbintub02S5whqTBRnDbJv sxxvNajT2ZtgOBQHBKLu8f/vUqKj3O6BceFWgYS9RCKroUMMQYjguKprcd+mzzWl YAYwhFbq3HdpWY1xj8O2MqsDxav4IT4mJ6NAkL7Qk/b6dra9Uil5JgLRrTy+jmR/ qj8NLCsNcRvpp39Hf/ISHbJ/1GZN3UplD8jaoVWgcwU//iVv1SLEWuqIh7Tgvg29 jfJFf9kMYGWQr1v1GLL6A48Mt7ufx3vbKIH9CFtKEqNTeg8AdiQim8JjPZLBIE0= =q63h -----END PGP SIGNATURE----- --6N0KlctTh4dwosRA-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/