Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2207388imm; Thu, 20 Sep 2018 09:19:59 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda1cdbT6I8+Rz9JOhlbzRezckIkv5VqmEp3lodxANcM++YAH1GtbMGhbIx6zQRbBicMZE4Q X-Received: by 2002:a63:1e0b:: with SMTP id e11-v6mr37324074pge.44.1537460399433; Thu, 20 Sep 2018 09:19:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537460399; cv=none; d=google.com; s=arc-20160816; b=Oma9gn0cMKXfod5Wa5qOIQwvNvLbKWIcHp6lR/Ock7dm+CsJ8K6depwKQoqtDPo66F 9WfmntDJyWe7CjteAbWZgYNj3MTRtrFEp/VR8fpJaUkFisn0ZhYBAsdnj1q3KXkaEDq8 7Xh8XLPlKfeib9zfkGWnYqfIHzXkZlaPLsFKzLI1wZqrSqiO2etFq7gNa3OZYm5NylPS x6qttZQgRKudxel1ddC8NMFjYx90LD7lINg2t0WPZ0n+65g9pycKtexByabBSUxr2mcV pZuEX6HIO0pwOKvDVTaJ4yNviTv/Wk6qaNDwYgCFaQ7KgO70c7xOYajCI+0cMk1973wi 08Ew== 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; bh=MphQ0lIyTvDl/Jou746DXEsAZKb85BMJ86NnTswrA/A=; b=qpsjCzBv1c7zsS1W/0NUkFV4MVGkyQsCa6Gmvokvuk5EHkrqmFXFwgKnDx6q0K9Shu aQV+ire3lAJ0nWiHnl5Aet2fcUPn1PpXHDGQYh6YMIbHNFosABcTY9pqkO5rRXsNXnLC 6/xpUFq6LnwjCQy/m3mtZ9cfVdiJvUQrIl+SWnMWvQggdoBVaVR7BDunfSOvJopwGY/k 1HLGs9z52dWTYUhhm48nFEWm8k8xbFQ3wDAlG4mp/KKAlSPu1hjMNh9LNQ6zZd63RpEx QLixc60l7YQwn820wFfXB3f2OvkkOYr8Dh5gitlVE5nA1wp+iOuhIIjXUgxJHWXvMWCb /iDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=RdQ4AA1x; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d11-v6si23678010pgh.564.2018.09.20.09.19.32; Thu, 20 Sep 2018 09:19:59 -0700 (PDT) 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=RdQ4AA1x; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728233AbeITWD2 (ORCPT + 99 others); Thu, 20 Sep 2018 18:03:28 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:34994 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726193AbeITWD2 (ORCPT ); Thu, 20 Sep 2018 18:03:28 -0400 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=MphQ0lIyTvDl/Jou746DXEsAZKb85BMJ86NnTswrA/A=; b=RdQ4AA1xkJz4siYlv0Z2a5H7g TC113zOlJHKK1m5AongXpB5ahj8z7J2djqPrjPiCKOn9vPebJwPwdtdBoo8OmMrGk2NWlXYJMCDLC KF+7mOpXBw+aDMem6SiHhz0wOaGQxbG0qrIShDfvaKsyvoqNSWFVJE39VhJDT64bXB2Zo=; Received: from [209.82.80.116] (helo=finisterre.ee.mobilebroadband) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1g31fa-000769-LF; Thu, 20 Sep 2018 16:19:10 +0000 Received: by finisterre.ee.mobilebroadband (Postfix, from userid 1000) id 1209C440078; Thu, 20 Sep 2018 17:19:06 +0100 (BST) Date: Thu, 20 Sep 2018 09:19:05 -0700 From: Mark Brown To: Cheng-Yi Chiang Cc: linux-kernel@vger.kernel.org, ryans.lee@maximintegrated.com, alsa-devel@alsa-project.org, dgreid@chromium.org Subject: Re: [PATCH 2/2] ASoC: max98927: Add reset-gpio support Message-ID: <20180920161905.GM2471@sirena.org.uk> References: <20180912121955.33048-1-cychiang@chromium.org> <20180912121955.33048-2-cychiang@chromium.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="VSJGZE3ajDCqFLUt" Content-Disposition: inline In-Reply-To: <20180912121955.33048-2-cychiang@chromium.org> X-Cookie: Universe, n.: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --VSJGZE3ajDCqFLUt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 12, 2018 at 08:19:55PM +0800, Cheng-Yi Chiang wrote: > + /* > + * Release reset GPIO because we are not going to use it. > + */ > + devm_gpiod_put(dev, max98927->reset_gpio); There is no need to do this, it's still potentially useful information for userspace and it's also going to surprise anyone who tries to modify the code to use this function at some other time (eg, when coming out of suspend sometimes it's useful to reset the device). > @@ -934,6 +1010,8 @@ static int max98927_i2c_probe(struct i2c_client *i2c, > if (ret < 0) > dev_err(&i2c->dev, "Failed to register component: %d\n", ret); > =20 > + list_add(&max98927->list, &reset_list); > + I'm not seeing any locking of this list. This also feels like something that shouldn't be in this driver but should be pushed up a level - it's only going to do the right thing if the reset line is only shared with other devices using this driver, if someone does something like put the CODEC and an external speaker amp on the same reset pin then it won't work. I'm not sure where the best place to do that is; drivers/reset isn't really for this use case but feels right perhaps? Can you perhaps split the basic reset handling out from this list handling as a separate patch? --VSJGZE3ajDCqFLUt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlujyHkACgkQJNaLcl1U h9BuFQf/Q5y6HzLzXxcbLIk/wGLLN6BWn65TTUXkpZyWSPWDu5ZTISi6mKO3ahpT xlqQXIWuY9T8DPL1tKUch40051dJExbQbd3y6JWUbQN0y0nqpKaCBhiqEYfG0Svj CT90BvsEfhHsBvx+gWw6DXWuRLjik9AKjgPBqkNtU3wSB06xWZoDXQpJC/5nCdns CmN/Y7UpGa5e5JAYGyYSeDu9Hna1Opb2nG+pDLqbgbmHpiTTo5Slc5etpavVl4rJ +ivSqktKhd882USl//O6LCP3A32VW+b8eG9LbCAe0PwQxfMaUIwVMm985PzvV5ld qtwLIvOYlMpZAZ2VBU4xrTxij2ab2Q== =80Zv -----END PGP SIGNATURE----- --VSJGZE3ajDCqFLUt--