Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2421219pxu; Mon, 7 Dec 2020 06:16:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJyqDCeZW1FUz14H5cIp1PbpMiYDTWOnQZ4j1SBVtuGH6EShtt/1F7+1vOiUw4GizY12KyUD X-Received: by 2002:a17:906:3bcd:: with SMTP id v13mr18946210ejf.181.1607350614371; Mon, 07 Dec 2020 06:16:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607350614; cv=none; d=google.com; s=arc-20160816; b=iTOQy+GmQEsQzDwuVorVFzn2zxEd/NF5BsPNnqY1X3jfDZHSGs01bTLTH9V8zSwGYc ssFWYHYgK7YTr3NugUSNNdEGxe8XizI+K+58I8nJXu9Pm2bKWUw8J75O5uf6Ijue8ItE kSlkAgf4UA6RBoBnieUz6X2hY77Mnlv3M3GFeboMLohyPcVi3x9ZEwybgEv2XxDNbaDZ gPU/x+KQZINd7NvbvXx3Zn5zBv/LE/4grDe3Hlb640yq0zQFx1hv5epE1h7iKehb5/CJ qsFfxtWU0pBQq2ubfmyRoPpGJ7wP1XLGrg/oYNDFz+BrAYrC0yzYCAsZmLHaYbCAL8ug SCHg== 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=jobBWtpS4GLCdnhwdBJ3wHgrSMQlKal/dV0iRztHitc=; b=VPQiLDhu0CHPmfARK1GWPHIJF788ScWSzudl7rWpNR1p3vdCakCqWMOJR1/XKa+XIM uO3RFZbsMzBTM2/QfQ8E+GLRFFSyP2uRXBAaEY/IgBC0KkuOupi6dCA5zx65tTOeANTQ S2aImDUqVvLMYiLboIfryld+xCV6F+tQJlBZW3IxO2uWO8Q3qJzgVoSu6axm+dWD5auE sviNmXkwtDy4pXtdq92jMxYSyBn8FTa2pOH4Zrz8adDmF/E14OeQek+xIhDgBpFoM/sW eP7T6/06LYag1jpAtVdFqYshsxO9n8rhFyLrhtf/uSNm7LTLjORK9BHG5YXRX58NHcNP aafg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HXUtVYWb; 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 t23si9014685edc.387.2020.12.07.06.16.31; Mon, 07 Dec 2020 06:16:54 -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=HXUtVYWb; 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 S1727099AbgLGOME (ORCPT + 99 others); Mon, 7 Dec 2020 09:12:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:60614 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726112AbgLGOMD (ORCPT ); Mon, 7 Dec 2020 09:12:03 -0500 X-Gm-Message-State: AOAM533K7mylYjlKBJ002qI/Bh7S4yxf/mu6Mefukiv3mGvSLQm8stza 2Bsqv87i27NBHDyqx61MnRNoZA5WZEGA0j+v0w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1607350283; bh=ExbBzZtI76UIjnZeTT9Tidvp9JWGG6DdN47dk5OWT64=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=HXUtVYWbEghrfqPpgZG0Y1ErflAbUdMPLlwaDgZKC3Xm/xJUURi+KUE5Ug3i94Jch hhMlMaTq5wwIA6QwbfvMIBe6UxG8trIqaG5bYvXmWJlsflDCKJ83tELbOicSQBWcHn H28CyhVnUM2yZX0lN3SUJyeifh7aDQ/MVafEXsI4kK2U6n4F/IA5v7WyLQwsbX5k1Y v61sVEEkiudPX1WHMM32iwGcchJ7QffcaMhKWKTIHEPQVvs7S5+uuajJaYw7sFZVUo 3+sKPXEuQXAvd5FE5GaUcuQkvNA7CDQAUeLsRWdFS/n6hjIC8VFf4QWjQ5vWTU8jZC 8prnuxMZh95GA== X-Received: by 2002:a50:c091:: with SMTP id k17mr19981518edf.137.1607350280143; Mon, 07 Dec 2020 06:11:20 -0800 (PST) MIME-Version: 1.0 References: <20201118071724.4866-1-wens@kernel.org> <20201118071724.4866-2-wens@kernel.org> In-Reply-To: <20201118071724.4866-2-wens@kernel.org> From: Rob Herring Date: Mon, 7 Dec 2020 08:11:08 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 1/4] PCI: rockchip: Make 'ep-gpios' DT property optional To: Chen-Yu Tsai Cc: Shawn Lin , Lorenzo Pieralisi , Bjorn Helgaas , Heiko Stuebner , Chen-Yu Tsai , Robin Murphy , Johan Jonker , PCI , "open list:ARM/Rockchip SoC..." , linux-arm-kernel , "linux-kernel@vger.kernel.org" , devicetree@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > return PTR_ERR(rockchip->ep_gpio); > -- > 2.29.1 >