Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp189877imm; Thu, 26 Jul 2018 01:35:44 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdAGPDIxTQaqEMEiuREsnz1XeBMwrzp8lrxPvc2UighUOVUaI7D6NoSboJqNWplg3HbQb2k X-Received: by 2002:a65:5581:: with SMTP id j1-v6mr1050451pgs.203.1532594144696; Thu, 26 Jul 2018 01:35:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532594144; cv=none; d=google.com; s=arc-20160816; b=fgXDKqv9TYl5rynBTjvZgVTGF75bZkm4EpuWVoBtm2PbM3TTK2U8pxnA47RpzwbOJB dAiC3fBLfw7O8aYy3Zi2KnXeCgaeB5qqAg3jfWTfn4dlhHiSAm1lqntjKOHfsoPCkCaZ 3ze6lN190POckvR+/sm4Wr9d7lEg5vWjPZA84KqX7gsEIRKpEdiqJq84uTuk6uWflky8 WPkuDndDCMRAP/scpz6pgcjUpFfYwT0IKVKlomffl7UZNa1+2JXOymteiI4bo0SeMNBm Bi8RIbt+3xDH/vUDXT3UusD3Z2UX+Svk8FXGFe5BEjEqy+tabfiVh7NTTyEQ1/xAhVNZ O8nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:arc-authentication-results; bh=ZAo9i8049J9TM9+O8n7CFUEuL14WtY6ku7wmwDIsaBs=; b=eP/w7CR8Zx3CQONKHn/sDQygLnLYNPOsE0l7CUy3ih0KAoOkHb+UutYOyuu5WCyMSH emO71n/u9LSsSY0dKDtyaf6VQuM0lWs71Im06AO07u4UHh2rIwcNoQ9MO+KIpdpCAFsx YHh739nc/CIf+W2RaxTTngA3agxAlxzUmE/Ke+/JxM1/99soOIeNdHS/HwgopZzdk4hx wjGCyFrYsvmCXCbpAyUIWIthxpUD5FPty9dOtm/dfx+0aKfr+ssQsI4Ok7n/rXG9HFBu QbqDlXOQIU7zK/QfmYuTM+GKvvrKDRF58ORLGa7iFjzdMzydPy8t+KGTUTqo+W7PGDfx OlBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b=rSUXA3HY; 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 f40-v6si749137plb.504.2018.07.26.01.35.29; Thu, 26 Jul 2018 01:35:44 -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=pass header.i=@agner.ch header.s=dkim header.b=rSUXA3HY; 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 S1729075AbeGZJuU (ORCPT + 99 others); Thu, 26 Jul 2018 05:50:20 -0400 Received: from mail.kmu-office.ch ([178.209.48.109]:54124 "EHLO mail.kmu-office.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727847AbeGZJuU (ORCPT ); Thu, 26 Jul 2018 05:50:20 -0400 Received: from webmail.kmu-office.ch (unknown [IPv6:2a02:418:6a02::a3]) by mail.kmu-office.ch (Postfix) with ESMTPSA id 9AEEA5C1E35; Thu, 26 Jul 2018 10:34:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1532594071; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZAo9i8049J9TM9+O8n7CFUEuL14WtY6ku7wmwDIsaBs=; b=rSUXA3HYeJQSK5PzO6JfgDwKzp89lgQeG/STyQvZS2f129gYlw/PArWYUSBulpC/Cnr43h tep4eBZhGcrR/LYiKQqXmBzHU5+CMcvZPZWn6TR0HVZkYR9h5NWYHnd/QGwROx8M9OsRlc Xq2QnRkGnU2ezKanCPCy3lbAeoboX4Y= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Date: Thu, 26 Jul 2018 10:34:30 +0200 From: Stefan Agner To: Marcel Ziswiler Cc: alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org, Marcel Ziswiler , Jaroslav Kysela , Thierry Reding , Jonathan Hunter , Mark Brown , linux-kernel@vger.kernel.org, Takashi Iwai , Liam Girdwood , linux-tegra-owner@vger.kernel.org Subject: Re: [PATCH 2/2] ASoC: tegra: probe deferral error reporting In-Reply-To: <20180720080424.31505-2-marcel@ziswiler.com> References: <20180720080424.31505-1-marcel@ziswiler.com> <20180720080424.31505-2-marcel@ziswiler.com> Message-ID: <2203d95715a9c73daa07c30ae37b095f@agner.ch> X-Sender: stefan@agner.ch User-Agent: Roundcube Webmail/1.3.4 X-Spamd-Result: default: False [-3.10 / 15.00]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCPT_COUNT_TWELVE(0.00)[12]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; DKIM_SIGNED(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_ZERO(0.00)[0]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%]; ARC_NA(0.00)[] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20.07.2018 10:04, Marcel Ziswiler wrote: > From: Marcel Ziswiler > > Actually report the error codes from of_get_named_gpio() resp. > devm_gpio_request_one() upon trying to get the codec reset resp. sync > GPIOs which may as well just be a probe deferrals. > > Signed-off-by: Marcel Ziswiler > > --- > > sound/soc/tegra/tegra20_ac97.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/sound/soc/tegra/tegra20_ac97.c b/sound/soc/tegra/tegra20_ac97.c > index 682ef33afb5f..4875512f0732 100644 > --- a/sound/soc/tegra/tegra20_ac97.c > +++ b/sound/soc/tegra/tegra20_ac97.c > @@ -351,18 +351,21 @@ static int tegra20_ac97_platform_probe(struct > platform_device *pdev) > ret = devm_gpio_request_one(&pdev->dev, ac97->reset_gpio, > GPIOF_OUT_INIT_HIGH, "codec-reset"); > if (ret) { > - dev_err(&pdev->dev, "could not get codec-reset GPIO\n"); > + dev_err(&pdev->dev, "could not get codec-reset GPIO: " > + "%d\n", ret); > goto err_clk_put; > } > } else { > - dev_err(&pdev->dev, "no codec-reset GPIO supplied\n"); > + ret = ac97->reset_gpio; > + dev_err(&pdev->dev, "no codec-reset GPIO supplied: %d\n", ret); > goto err_clk_put; > } > > ac97->sync_gpio = of_get_named_gpio(pdev->dev.of_node, > "nvidia,codec-sync-gpio", 0); > if (!gpio_is_valid(ac97->sync_gpio)) { > - dev_err(&pdev->dev, "no codec-sync GPIO supplied\n"); > + ret = ac97->sync_gpio; > + dev_err(&pdev->dev, "no codec-sync GPIO supplied: %d\n", ret); > goto err_clk_put; This will still print an error on defer, which is not really nice. I suggest to suppress defer errors completely, e.g. by: if (ret != -EPROBE_DEFER) dev_err(&pdev->dev, "no codec-sync GPIO supplied: %d\n", ret); The driver framework provides debug level prints if debugging of deferred probing is required. -- Stefan > }