Received: by 10.223.185.116 with SMTP id b49csp1019434wrg; Wed, 21 Feb 2018 10:40:23 -0800 (PST) X-Google-Smtp-Source: AH8x224UD9AvWHKMhvqhFww9MDQIq+1kFMNFYiH5uvdjB6+XvnMP/AeJCsxrV6cJLli/bQenvQXp X-Received: by 2002:a17:902:595d:: with SMTP id e29-v6mr3996617plj.189.1519238423395; Wed, 21 Feb 2018 10:40:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519238423; cv=none; d=google.com; s=arc-20160816; b=mB3vAcUEJwShPiM7L+c4K6AKuUNBVSMgOQ6M6EEQo95vxjahI93V3qxqV32zm13U/0 bQ5pLLASm4Ri+0GXTxrBoLljc1vba0rnkjptSF/m+zYkam6mOK8BI1vmT/UNlIhOGbPu LB+NrB18+5d0/A1m1e/a/dmymHeE9BRwAxNeu6vbKERbB9NUJeBEZw/ZGmuMCNm6YxF/ 8opOCL3BsKE2nrqgG6/UhLPOMNERmRrggHh7I+OL1EXOrvL/QSX2nYx7iymYIDY3xPAC Q4gqMrhzJRHkLhEDPVW40Z6riVKrRZsyZJ4almo5UPkgf+/Gjl1Bva3NrtB4il22By2T xMBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language:thread-index :content-transfer-encoding:mime-version:message-id:date:subject :in-reply-to:references:cc:to:from:arc-authentication-results; bh=0zQi2E8OQOfh8MYCrfRIXNhLzfo3rgRN5LrOsj/ggqE=; b=wBDuCwFGOnzpf1mg5U8vVI5ZnFy/lEOZ+n0C9ej8r8go6Fk2ey4Kwmq+MUaQ8N8s2Z rX73kY2eLA+Zps5v/s3WeQp2H7L5atyFrhb+ev1FiTY0ht9rirQc1hxcMJSoNiyVZl80 PUBhnFprJsYSWozGBB2BUAT309rrY9mFHGYg4T464YRubtTBcmVzEtFPhVg4cMkPe3RW oVOzLeBQ/koP9m24ltDfpnEzi46M6F9R3OeL31p9Cjcc5GJoiTwfbNu2alAnHOf14TXT Stn5ZL2jGe/VV0FgcFaedJMABD14Ja19ji7bwnyQEOpOyk+Mz/4LJzHGCq561ufsOx4X vrOg== ARC-Authentication-Results: i=1; mx.google.com; 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 m189si34198pfc.410.2018.02.21.10.40.09; Wed, 21 Feb 2018 10:40:23 -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; 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 S936513AbeBUNP7 (ORCPT + 99 others); Wed, 21 Feb 2018 08:15:59 -0500 Received: from mx.socionext.com ([202.248.49.38]:15785 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753795AbeBUNP5 (ORCPT ); Wed, 21 Feb 2018 08:15:57 -0500 Received: from unknown (HELO iyokan-ex.css.socionext.com) ([172.31.9.54]) by mx.socionext.com with ESMTP; 21 Feb 2018 22:15:56 +0900 Received: from mail.mfilter.local (m-filter-2 [10.213.24.62]) by iyokan-ex.css.socionext.com (Postfix) with ESMTP id 32A7C6006F; Wed, 21 Feb 2018 22:15:56 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Wed, 21 Feb 2018 22:16:35 +0900 Received: from yuzu.css.socionext.com (yuzu [172.31.8.45]) by kinkan.css.socionext.com (Postfix) with ESMTP id CBA351A159F; Wed, 21 Feb 2018 22:15:55 +0900 (JST) Received: from DESKTOPFLNNJ4T (unknown [10.213.132.95]) by yuzu.css.socionext.com (Postfix) with ESMTP id 99C8512042A; Wed, 21 Feb 2018 22:15:55 +0900 (JST) From: "Katsuhiro Suzuki" To: "'Mark Brown'" , =?iso-2022-jp?B?U3V6dWtpLCBLYXRzdWhpcm8vGyRCTmtMWhsoQiAbJEI+IUduGyhC?= Cc: , "Rob Herring" , , "Masami Hiramatsu" , "Jassi Brar" , , References: <20180221043311.25840-1-suzuki.katsuhiro@socionext.com> <20180221043311.25840-3-suzuki.katsuhiro@socionext.com> <20180221122639.GH8334@sirena.org.uk> In-Reply-To: <20180221122639.GH8334@sirena.org.uk> Subject: Re: [PATCH 2/2] ASoC: support ROHM BD28623 codec Date: Wed, 21 Feb 2018 22:15:52 +0900 Message-ID: <002601d3ab16$195fdf20$4c1f9d60$@socionext.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQHTqs0WYpLkxEPPmUeTrT/mwR3ztaOuMfeAgACiNwA= Content-Language: ja x-securitypolicycheck: OK by SHieldMailChecker v2.5.2 x-shieldmailcheckerpolicyversion: POLICY180220 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Mark, > -----Original Message----- > From: Mark Brown [mailto:broonie@kernel.org] > Sent: Wednesday, February 21, 2018 9:27 PM > To: Suzuki, Katsuhiro > 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 > > 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. > Thank you, I'll fix it. > > + 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. > These GPIO is optional if board vendor connects directly RSTX and MUTEX pins to VCC. So I think I should fix DT-bindings document. > > +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. Ah, indeed. I will use component driver's remove() function instead of platform. Thank you for review! Regards, -- Katsuhiro Suzuki