From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E54CC433F5 for ; Thu, 10 Mar 2022 11:29:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241588AbiCJLab (ORCPT ); Thu, 10 Mar 2022 06:30:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232832AbiCJLaY (ORCPT ); Thu, 10 Mar 2022 06:30:24 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2A5713D56C for ; Thu, 10 Mar 2022 03:29:23 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7A01F61602 for ; Thu, 10 Mar 2022 11:29:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 902C0C340E8; Thu, 10 Mar 2022 11:29:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646911762; bh=uKKQrIIKFBwSgsheqX3HqJPqfhTRezkt/iDCDYvlKjw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PAcTTaf/++SYkJuCwSUTxJMpZrgKyZrjOaqYjC1VoO98l0THMkZSMbZu7LKF3496a e1HwiQ07mfaL7e3jcAIbdp00GgKWPbU6uy5CMHl7pqvxfX2WVsz4R+eLnkBvtpnzCQ s0LP+clmvzK72uKL07fwm8pF/O1HU/lVRO4rsYGTVdQRkzGioNhRsrgECcVS+pe9bi mi33nmsiN/e3wf+0aEsQM1dJGhkBuA3+vr+aUT/TpNY6uLWGidNg8FbmvakJ4qb5nb PbjkB8tnAL08YlKmgIawgsFQJG3OHg8yroIX3KC8PsqkGN0v0PwSyt5/kS1FwVl7/P bLoBpimh95KWg== Date: Thu, 10 Mar 2022 11:29:16 +0000 From: Mark Brown To: "Sa, Nuno" Cc: Steve Lee , "lgirdwood@gmail.com" , "perex@perex.cz" , "tiwai@suse.com" , "ckeepax@opensource.cirrus.com" , "geert@linux-m68k.org" , "rf@opensource.wolfsonmicro.com" , "shumingf@realtek.com" , "srinivas.kandagatla@linaro.org" , "krzk@kernel.org" , "dmurphy@ti.com" , "jack.yu@realtek.com" , "steves.lee@maximintegrated.com" , "linux-kernel@vger.kernel.org" , "alsa-devel@alsa-project.org" Subject: Re: [PATCH] ASoC: max98390: Add reset gpio control Message-ID: References: <20220310081548.31846-1-steve.lee.analog@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="MNhXQ4XGIMsIAMHL" Content-Disposition: inline In-Reply-To: X-Cookie: Package sold by weight, not volume. Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --MNhXQ4XGIMsIAMHL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Mar 10, 2022 at 08:48:09AM +0000, Sa, Nuno wrote: > > + max98390->reset_gpio = of_get_named_gpio(i2c- > > >dev.of_node, > > + "maxim,reset-gpios", 0); > Why not using devm_gpiod_get_optional()? We could request the pin > already in the asserted state and make the code slightly better... Yes, and it'd support other firmware interfaces too. We also need an update to the binding document covering the new property. Might also be worth putting the device into reset when unloading the driver, though that's not essential. --MNhXQ4XGIMsIAMHL Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmIp4QsACgkQJNaLcl1U h9D6+Af5AXegHDTeiZ2MbFDMHQu/VHpOn1eZieGYkMAzHrNIZ2MzpuTWfomE5iHl 7G5MqciVxPQpF37CSt52SiQhpFbIsaTgJ1d7gM9PMWhLWCElhKVJu1XUWZOEH92E v+GRHLgkF6JNgpQpUgLejjH1uo/LeVJX9o2UKir4pPAJKhB40VuYhi80k7AqVXPC 9WF8f7tiIowmOozzmTwkjmJuWHgGbZ83mCyz15OtOpitXDTrxgoABc+XxXnJEAEJ nUBMjbl7kknWM8+hGNjoVLG7q0MiSB5SNM3K6RWfAgUHQKG2UmGcA07sz+4GSJpI A7wBQjTNTErXCjUsqVIetHCW6iKBgw== =GZqX -----END PGP SIGNATURE----- --MNhXQ4XGIMsIAMHL-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DCAD4C433F5 for ; Thu, 10 Mar 2022 11:30:23 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id DE7F818A2; Thu, 10 Mar 2022 12:29:31 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DE7F818A2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1646911822; bh=uKKQrIIKFBwSgsheqX3HqJPqfhTRezkt/iDCDYvlKjw=; h=Date:From:To:Subject:References:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=m7ww9utEHy++mL9cKxguAoXu/I45+vW7pS4ZDr9Uup3/glG2em/CnhRjdEAl9Mq1t LPdmYQyDs/H5DxzDJpT+tnIf8A8te4epHZo2c3eR853VNGSPsZAHT4bxuDmO7HhM4Y T+UZqTfxiz7qOAXZlrdG5xx0d/JfHOXAO66DKUYk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 73D65F8012F; Thu, 10 Mar 2022 12:29:31 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 45AFBF80137; Thu, 10 Mar 2022 12:29:29 +0100 (CET) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 6924FF800FD for ; Thu, 10 Mar 2022 12:29:26 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6924FF800FD Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PAcTTaf/" Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 72E0D614AD; Thu, 10 Mar 2022 11:29:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 902C0C340E8; Thu, 10 Mar 2022 11:29:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646911762; bh=uKKQrIIKFBwSgsheqX3HqJPqfhTRezkt/iDCDYvlKjw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PAcTTaf/++SYkJuCwSUTxJMpZrgKyZrjOaqYjC1VoO98l0THMkZSMbZu7LKF3496a e1HwiQ07mfaL7e3jcAIbdp00GgKWPbU6uy5CMHl7pqvxfX2WVsz4R+eLnkBvtpnzCQ s0LP+clmvzK72uKL07fwm8pF/O1HU/lVRO4rsYGTVdQRkzGioNhRsrgECcVS+pe9bi mi33nmsiN/e3wf+0aEsQM1dJGhkBuA3+vr+aUT/TpNY6uLWGidNg8FbmvakJ4qb5nb PbjkB8tnAL08YlKmgIawgsFQJG3OHg8yroIX3KC8PsqkGN0v0PwSyt5/kS1FwVl7/P bLoBpimh95KWg== Date: Thu, 10 Mar 2022 11:29:16 +0000 From: Mark Brown To: "Sa, Nuno" Subject: Re: [PATCH] ASoC: max98390: Add reset gpio control Message-ID: References: <20220310081548.31846-1-steve.lee.analog@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="MNhXQ4XGIMsIAMHL" Content-Disposition: inline In-Reply-To: X-Cookie: Package sold by weight, not volume. Cc: Steve Lee , "jack.yu@realtek.com" , "alsa-devel@alsa-project.org" , "ckeepax@opensource.cirrus.com" , "steves.lee@maximintegrated.com" , "linux-kernel@vger.kernel.org" , "tiwai@suse.com" , "krzk@kernel.org" , "lgirdwood@gmail.com" , "geert@linux-m68k.org" , "dmurphy@ti.com" , "shumingf@realtek.com" , "srinivas.kandagatla@linaro.org" , "rf@opensource.wolfsonmicro.com" X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" --MNhXQ4XGIMsIAMHL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Mar 10, 2022 at 08:48:09AM +0000, Sa, Nuno wrote: > > + max98390->reset_gpio = of_get_named_gpio(i2c- > > >dev.of_node, > > + "maxim,reset-gpios", 0); > Why not using devm_gpiod_get_optional()? We could request the pin > already in the asserted state and make the code slightly better... Yes, and it'd support other firmware interfaces too. We also need an update to the binding document covering the new property. Might also be worth putting the device into reset when unloading the driver, though that's not essential. --MNhXQ4XGIMsIAMHL Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmIp4QsACgkQJNaLcl1U h9D6+Af5AXegHDTeiZ2MbFDMHQu/VHpOn1eZieGYkMAzHrNIZ2MzpuTWfomE5iHl 7G5MqciVxPQpF37CSt52SiQhpFbIsaTgJ1d7gM9PMWhLWCElhKVJu1XUWZOEH92E v+GRHLgkF6JNgpQpUgLejjH1uo/LeVJX9o2UKir4pPAJKhB40VuYhi80k7AqVXPC 9WF8f7tiIowmOozzmTwkjmJuWHgGbZ83mCyz15OtOpitXDTrxgoABc+XxXnJEAEJ nUBMjbl7kknWM8+hGNjoVLG7q0MiSB5SNM3K6RWfAgUHQKG2UmGcA07sz+4GSJpI A7wBQjTNTErXCjUsqVIetHCW6iKBgw== =GZqX -----END PGP SIGNATURE----- --MNhXQ4XGIMsIAMHL--