From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752207AbbKVNrV (ORCPT ); Sun, 22 Nov 2015 08:47:21 -0500 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:43252 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752238AbbKVNpk (ORCPT ); Sun, 22 Nov 2015 08:45:40 -0500 Date: Sun, 22 Nov 2015 13:44:40 +0000 From: Mark Brown To: Simran Rai Cc: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Ray Jui , Scott Branden , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Lori Hikichi , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, linux-kernel@vger.kernel.org, Arun Parameswaran , alsa-devel@alsa-project.org Message-ID: <20151122134440.GQ26072@sirena.org.uk> References: <1447114664-21799-1-git-send-email-ssimran@broadcom.com> <1447114664-21799-3-git-send-email-ssimran@broadcom.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ZgGN478A9hzzvyZc" Content-Disposition: inline In-Reply-To: <1447114664-21799-3-git-send-email-ssimran@broadcom.com> X-Cookie: Your domestic life may be harmonious. User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: 188.29.165.171 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH v4 2/3] ASoC: cygnus: Add Cygnus audio DAI driver 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 --ZgGN478A9hzzvyZc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Nov 09, 2015 at 04:17:43PM -0800, Simran Rai wrote: > +#ifdef CONFIG_PM_SLEEP > +static int cygnus_ssp_suspend(struct snd_soc_dai *cpu_dai) > +{ > + struct cygnus_aio_port *aio = cygnus_dai_get_portinfo(cpu_dai); > + struct cygnus_audio *cygaud = snd_soc_dai_get_drvdata(cpu_dai); > + > + audio_ssp_out_disable(aio); > + audio_ssp_in_disable(aio); > + if (cygaud->active_ports > 0) > + cygaud->active_ports--; > + > + return 0; > +} > + > +static int cygnus_ssp_resume(struct snd_soc_dai *cpu_dai) > +{ > + return 0; > +} I'm a bit confused here - why do we need to disable things on suspend but not reenable them on resume? I'd expect that the core would have quiesced any streams that need to be suspended before we get as far as suspending the drivers. Please also remove empty functions. Now I check I see that I'm repeating the questions I had on my previous review: | Blank line between functions and remove empty functions. Though I'm not | clear why the result doesn't undo what the suspend did... Please don't ignore review comments. > + parent = clk_get_parent(cygaud->audio_clk[0]); > + if (IS_ERR(parent)) { > + error = PTR_ERR(parent); > + goto err_get_parent; > + } > + > + /* Set PLL VCO Frequency (Hz) to default */ > + error = clk_set_rate(parent, DEFAULT_VCO); > + if (error) { > + dev_err(&pdev->dev, > + "%s Set PLL VCO rate failed: %d\n", __func__, error); > + goto err_get_parent; > + } I would expect any initialisationn of clocks beyond the ones that the device directly interacts with to be handled within the clock API configuration rather than in a specific driver, this avoids the driver being dependent on a particular system integration. --ZgGN478A9hzzvyZc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWUcbHAAoJECTWi3JdVIfQ+eYH/2iAM5EG7TBiRDGOJ0CQr3cg RctDChD6oLqIz/dnSybXSfMK7zsjO4WsVbvFC9ZIPNRB6mwn85llBAyufnIvMRM0 n5objnv43yRB/3sbV8Y/LxOS/HFUrlADbpXbXAE7ZEamF5M7a6TEcD6N8vVdUS9h NmL7hRnKnO3axzaK8tRbR9hiS2Sy4Qjd9MN9lTOXdKuMo4801mFkMThTXb1ZbybG e177iOopWw4fQnx/DKS3hGspbt2gtWJJw8jPdVAw2H/RQ4MDKxW1fDAbtjQhQvIR JZj2tBc6k/Vw1cEWW/FFuylCQ8s6kcT9cxdlClgBVUkRHQDkYGViLgAEnFVvrXY= =mY5B -----END PGP SIGNATURE----- --ZgGN478A9hzzvyZc--