From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A27EBC2BB40 for ; Mon, 14 Dec 2020 14:19:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6A98222BEF for ; Mon, 14 Dec 2020 14:19:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439555AbgLNOSJ (ORCPT ); Mon, 14 Dec 2020 09:18:09 -0500 Received: from mail.kernel.org ([198.145.29.99]:57358 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2439156AbgLNOSJ (ORCPT ); Mon, 14 Dec 2020 09:18:09 -0500 X-Gm-Message-State: AOAM531lIkxewA9BovAnIlo4+Au62ebp07CxVhEIMAZ+zXPsjotv4XkY mWAzVpcVRibYU803TN/PuPyf+QP2HZSF4idmgg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1607955448; bh=vgF8+AK6GkBkQYu4wyAk0STQnnPO354gKvQ6xqwdcfA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=UmexIdARMA6NpqX5l/Ll1YH7GxF2bLQRdPOHD/ZZIUFm5MJNvSr2lKR1TSEU0DJGj 6l7ix120lUgWQu482Ycgcty7yW3BRqOatZsrfTlM5v65GdoRdrkXX2aywlRUziM3cZ qodmZ0IwyS5ZXX1829JWd3FEkE3IP9G+T3diDYTe2wafs3ufzRLzb38pHXL3w05pyl 5urYUo3XBlIiDijQ+p4vvKG9HNiT6hY+a5Q3xrL4lYRTtiZfwPwyOHs1QbcTvPR81+ OUPNQzjxhLDJCm56ps8uqr6NkD6bkLaB5W8pFjGl5B2StUSP5umPrtlWGRSfA5Le86 TqzRm9q75FaQA== X-Google-Smtp-Source: ABdhPJzYRe4IfcaOp8gXNnir2xIHkexB7fAKbIAKD+/2t8UmLHcMcL+EMxw9BMGG2PCerqzkxj+BwlEdA4xVCD10jVg= X-Received: by 2002:aa7:d154:: with SMTP id r20mr26170869edo.258.1607955447089; Mon, 14 Dec 2020 06:17:27 -0800 (PST) MIME-Version: 1.0 References: <20201118071724.4866-1-wens@kernel.org> <20201118071724.4866-2-wens@kernel.org> In-Reply-To: From: Rob Herring Date: Mon, 14 Dec 2020 08:17:15 -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 , 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-pci@vger.kernel.org On Sat, Dec 12, 2020 at 9:18 AM Chen-Yu Tsai wrote: > > 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. I guess, but those errors should be in the subsystem code IMO rather than every driver. Rob