Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2276357pxu; Sun, 13 Dec 2020 20:26:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJw4jBQxd8w7CI0H19UkZYCD0ABcb2hyjC/Z3CLYavl6ZXtBbSg/90X8XjN5pECKaD3QhHTf X-Received: by 2002:a17:906:7687:: with SMTP id o7mr21186111ejm.209.1607919963103; Sun, 13 Dec 2020 20:26:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607919963; cv=none; d=google.com; s=arc-20160816; b=AYigNTbUKf4zQMVftFkKXaNBgR6UTL6BlDmE6KNeM2BZgfdzDJoRW6amAzCFbxo06T 0Pey1mWFNUxtiU2tl/Othkg9DH+NfoRI1HBScVb5oi9VRha5LnNEqFWBhe8pqu15b1j4 CtDh8aGNmEgGZyX50DAsvlbFPdpH4CYfPIyCNeALft+PGj2CeafZuB6/bRptO5L0C4OV ZknNlZbaJkZVEhjs+EECGcC0J6kBue3lx65amkQbNgxCCM+pC/m1wGYIVc4ORgKiYVTX 9QjuCbW4Sd0aBoY3TCVJmlmwU9SgGuKPkZ45zDjKsa/7aknhTkq3WDwSfXJvcVh/M/a+ hBGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=7r66W63WI1zx2vXQwOTTsdw6EJKVD1o5QXffB9xEKNM=; b=bdGvHT/0qOrmBG7JnY6Xi3K2FtU8JbcEXYYxkj69djksiuQJEY4T29eTbRGzTSE6De fGcr7RJEoIlCKRRamBy9No0sA++w5vSsql7O2j2nme4SRc1pU8rEMbxKB0ZKNcOxXps6 JK3SBAT9uJ1OVxzszfF0rCfwHnxpWldY9/Y2E9uD8Jv95pBCt4LdTfCfyGLpPk26B6fq fEg50pejhOjyB4E42uUmk/yuj+BMXGQC7LMUlixZNgwTyj5TQxL7APF6DLANyIiu1xDj v9hds+sfmBy8LSdFPnzcheLUIL327sr0kYzqdiyeYdw21rmdcQ7C6EJVzlDFU1vvYXKN r16g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RmFUg1o5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hs21si9348647ejc.395.2020.12.13.20.25.26; Sun, 13 Dec 2020 20:26:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RmFUg1o5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439243AbgLLPTa (ORCPT + 99 others); Sat, 12 Dec 2020 10:19:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:50360 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725550AbgLLPTM (ORCPT ); Sat, 12 Dec 2020 10:19:12 -0500 X-Gm-Message-State: AOAM532Nx+9hrRde1Wogr21fNly1ShBy18YGqbulx7NXCgQtFnydjgwR +WapUYbDeTdLPy/zsoZ7bDQZOykg1XwoqXS0YIs= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1607786311; bh=psS0hu2IUIHN0p65FsTtGV4EUTtLG77MUOh+AZo/pFQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=RmFUg1o5T+2sP8kQE8wa7IRy+eKJo5EB9Gh6xs3WbV2I5d+MTIBbS4YUCVy94Z8S/ rs119tEMc8dJogiB88HTo3QzFZaReIkLWA8mDrP3WEpjmzAWNglqghpD9zk9EZenad 91ZdRJEOzgl3NsT5MJ5lsEaSK5mIpKSOals2+XUqWFRDAmbI+/5i/gABtOl2UFTa0s RSPNcCwgf1tNBTn3Ptckf37nnREh+LBol2X7QYPZaNAR0F7DpiWexMD3vj6ijbFbYJ ouatYiF+r0HIa6aBWBUD5LUPrG+1KTTWQ8pKO67Gx5wyw9n8yTuv3PU/WAVGVujGhz v9V3IqYY/d4KQ== X-Received: by 2002:a67:fd88:: with SMTP id k8mr15795093vsq.17.1607786310790; Sat, 12 Dec 2020 07:18:30 -0800 (PST) MIME-Version: 1.0 References: <20201118071724.4866-1-wens@kernel.org> <20201118071724.4866-2-wens@kernel.org> In-Reply-To: From: Chen-Yu Tsai Date: Sat, 12 Dec 2020 23:18:17 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 1/4] PCI: rockchip: Make 'ep-gpios' DT property optional To: Rob Herring Cc: Chen-Yu Tsai , Shawn Lin , Lorenzo Pieralisi , Bjorn Helgaas , Heiko Stuebner , Robin Murphy , Johan Jonker , PCI , "open list:ARM/Rockchip SoC..." , linux-arm-kernel , "linux-kernel@vger.kernel.org" , devicetree Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 7, 2020 at 10:11 PM Rob Herring wrote: > > On Wed, Nov 18, 2020 at 1:17 AM Chen-Yu Tsai wrote: > > > > From: Chen-Yu Tsai > > > > The Rockchip PCIe controller DT binding clearly states that 'ep-gpios' is > > an optional property. And indeed there are boards that don't require it. > > > > Make the driver follow the binding by using devm_gpiod_get_optional() > > instead of devm_gpiod_get(). > > > > Fixes: e77f847df54c ("PCI: rockchip: Add Rockchip PCIe controller support") > > Fixes: 956cd99b35a8 ("PCI: rockchip: Separate common code from RC driver") > > Fixes: 964bac9455be ("PCI: rockchip: Split out rockchip_pcie_parse_dt() to parse DT") > > Signed-off-by: Chen-Yu Tsai > > --- > > Changes since v1: > > > > - Rewrite subject to match existing convention and reference > > 'ep-gpios' DT property instead of the 'ep_gpio' field > > --- > > drivers/pci/controller/pcie-rockchip.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/pci/controller/pcie-rockchip.c b/drivers/pci/controller/pcie-rockchip.c > > index 904dec0d3a88..c95950e9004f 100644 > > --- a/drivers/pci/controller/pcie-rockchip.c > > +++ b/drivers/pci/controller/pcie-rockchip.c > > @@ -118,7 +118,7 @@ int rockchip_pcie_parse_dt(struct rockchip_pcie *rockchip) > > } > > > > if (rockchip->is_rc) { > > - rockchip->ep_gpio = devm_gpiod_get(dev, "ep", GPIOD_OUT_HIGH); > > + rockchip->ep_gpio = devm_gpiod_get_optional(dev, "ep", GPIOD_OUT_HIGH); > > if (IS_ERR(rockchip->ep_gpio)) { > > dev_err(dev, "missing ep-gpios property in node\n"); > > You should drop the error message. What it says is now never the > reason for the error and it could most likely be a deferred probe > which you don't want an error message for. What about switching to dev_err_probe() instead? That way deferred probe errors get silenced (or get a better debug message), and error messages for other issues, such as miswritten gpio properties are still produced. ChenYu > > return PTR_ERR(rockchip->ep_gpio); > > -- > > 2.29.1 > >