Received: by 10.223.185.116 with SMTP id b49csp923706wrg; Wed, 21 Feb 2018 09:05:56 -0800 (PST) X-Google-Smtp-Source: AH8x226oWQKaG9XqoiJG0zSNfKP52nVZPW7mdx8OeVT25scFeFDQSmObiSCHwrXCJqOR94XIR0qN X-Received: by 10.99.171.10 with SMTP id p10mr3226152pgf.176.1519232756200; Wed, 21 Feb 2018 09:05:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519232756; cv=none; d=google.com; s=arc-20160816; b=zQGE4JjieXAl6mqTHHczo8z7dLDyC/rjIwYMOdRElJqjbI1ZmDJH3yFiD7fcmJYg+h 6sebQEOldi5ntfkx6gAX8/SyDWlsAWKn/SitERygRHCc0RSLvVxQqDPJvpa+L4vuKoel aJ3SXUsX94EkloDz5qnfys6csZl0bSukAkC9B/7W5d4CKK9EKl+2jLgFXb3lAK9m0d9e VuDeGBKt3yK4/yI9oldCStuSqCrRXSHqikHc5VDFIYKH1Y+LxAM1mh43HRjAxcidbTn2 5wy1WdwCQNS84ub0XR1RfS2CvrunPABNodzmUn0ftuvRYwvMd0VjJ9cHMAg131u99yIi W0nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=6GFpi6YzFF6cQYxG5k8GIj1ScTCqVI/K1g3j3a70ruc=; b=YVzSBYQpuaBTGaj0pwYwDGwHDVfZsCT2Hdnv+9vkBU7NiYGX6MAD7MbuCt8OEKfdH9 3xI1z/lD8a+ZjHnBqQYjXZQ27T3NlZQ8idEpfQNNKIsjTD8pmkiiifts2dS7A2LuTVbh mLUVsPJTkMzFJ8A4ZKipQHji/bNK9g8VuofH1oxbvke2kE2G/A2CcCOlDGB5fjHI77sq 9lBx2MlWOOFQGLt+F+zPttgUb72Dfd0dbmQslXBZtxbT9o2roj8H3+jBCp96q4mbDQqZ HyMhAQJKnkbQgF3lOeZJOTckjNUwFwAVChqdxaZBCLiK0Ln3HuEVskBHa8WzLAkHldSg /SUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=X2aaLrbQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l67si3396613pfb.329.2018.02.21.09.05.32; Wed, 21 Feb 2018 09:05:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=X2aaLrbQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752488AbeBUM0q (ORCPT + 99 others); Wed, 21 Feb 2018 07:26:46 -0500 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:51116 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751560AbeBUM0p (ORCPT ); Wed, 21 Feb 2018 07:26:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=6GFpi6YzFF6cQYxG5k8GIj1ScTCqVI/K1g3j3a70ruc=; b=X2aaLrbQblaNQbCUVu4TfEZK6 DpEsTMeyesPaWixYz5pgL6d9VjPCw6PXT+tO39VlW58ObP/lWvMRwhKS0Wq6XHX8lVKkcQvXQw8Q0 yjSJURNJsKfMvm7XPgZwBWaz1YwhA51ZArbfX6Z/vWjnK8ztkDkR10p3KPpihxdDAA/n8=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1eoTTs-0007Lk-B9; Wed, 21 Feb 2018 12:26:40 +0000 Received: from broonie by debutante with local (Exim 4.90_1) (envelope-from ) id 1eoTTr-0005kl-QZ; Wed, 21 Feb 2018 12:26:39 +0000 Date: Wed, 21 Feb 2018 12:26:39 +0000 From: Mark Brown To: Katsuhiro Suzuki Cc: alsa-devel@alsa-project.org, Rob Herring , devicetree@vger.kernel.org, Masami Hiramatsu , Jassi Brar , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] ASoC: support ROHM BD28623 codec Message-ID: <20180221122639.GH8334@sirena.org.uk> References: <20180221043311.25840-1-suzuki.katsuhiro@socionext.com> <20180221043311.25840-3-suzuki.katsuhiro@socionext.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="D6IIOQQv2Iwyp54J" Content-Disposition: inline In-Reply-To: <20180221043311.25840-3-suzuki.katsuhiro@socionext.com> X-Cookie: Condense soup, not books! User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --D6IIOQQv2Iwyp54J Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Feb 21, 2018 at 01:33:11PM +0900, Katsuhiro Suzuki wrote: > +++ b/sound/soc/codecs/bd28623.c > @@ -0,0 +1,258 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * ROHM BD28623MUV class D speaker amplifier codec driver. > + * Please make the entire comment C++ so this looks intentional. > + dev_err(dev, "Failed to enable supplies: %d\n", ret); > + return ret; > + } > + > + gpiod_set_value(bd->reset_gpio, 0); Since this GPIO is not needed in atomic contexts you should use the _cansleep() versions of the GPIO functions - it doesn't cost you anything and means that if for some reason someone wired this up to a GPIO that can't be used in atomic context the driver will just work. > + bd->reset_gpio = devm_gpiod_get_optional(dev, "reset", > + GPIOD_OUT_HIGH); > + bd->mute_gpio = devm_gpiod_get_optional(dev, "mute", > + GPIOD_OUT_HIGH); These properties were documented as mandatory in the binding but are optional here. It's fine that they're optional but I'd expect the binding to be consistent with this. > +static int bd28623_remove(struct platform_device *pdev) > +{ > + struct bd28623_priv *bd = platform_get_drvdata(pdev); > + > + regulator_bulk_disable(ARRAY_SIZE(bd->supplies), bd->supplies); > + > + return 0; > +} We don't enable the supplies explicitly as part of the probe function so it feels wrong to disable on remove() - I'm sure it is fine in practice as-is but I'd have to think too hard to confirm that. I'd put this in a component level remove function instead so that it's consistent. --D6IIOQQv2Iwyp54J Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlqNZX8ACgkQJNaLcl1U h9DNAQf9FMSYO+XzOf0FlGdUNepbhpojEFe1cMVQrWpLcByW145hU9fzr1zi6Bj4 A2orZHrJcODhcCmwqVJ3UX0mlKlYuDKN+DfQ2QXGIg3Hic3FXEBN9XySXB3eto5d rwpyHRJBNTZUC7R81N9Bg2zYqhcQjynZu1smSas4iBCTlAGZK3J/Ukwhz3ycL/fr YU7P0QjjqH9Z3eLHrk7WVuIYLDjH7n/BbiZfKVFX/4c9Rhu3o7o5iYEHYSGnFfnx PaPnLnkgFd8inLLG6WcujCQqN1RGw8ZACSLRNB9MRDsqIlEkuGSmc+rliW190zYI IaPz4u38Uz6EF/CWa8XjNYJltC73Ww== =UtZM -----END PGP SIGNATURE----- --D6IIOQQv2Iwyp54J--