Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2108112pxu; Sun, 6 Dec 2020 19:34:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJyvFVIA4Bahz0tKluwnIah1bzaPG5q4wq3GS54qdN90Um/J2h1i+0mfLA8BRtjGGDhfX35D X-Received: by 2002:a17:906:d72:: with SMTP id s18mr17401646ejh.110.1607312059424; Sun, 06 Dec 2020 19:34:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607312059; cv=none; d=google.com; s=arc-20160816; b=ZK154isuzoMS9QvhZ0V8MJDNausyVfRD0a7ill9CQ0fkmPST0ZNsE2KBtC3O7aJf4D kd+8Mub9+qqGXoR+ghfIBE9RBr0r14zPQpGFeE4G+pEqUE9hlaTzmrvSvVGOVMiCXhsG 5yBdMbwzUkAd0ABkRE4m9Ix3UtdgzTZqLPwGjWEmEfeNhSYomz1CuUnr0J1b1LczhTVS WGypclVl/25WwUwxgutPu103lBg/QJkrHn9/unQXrKqVrpparFX46+G8r6HOK/RAJAin +JG42Rym5mo/wzbc/qEUUfDWakprsX6A234KK0zCCQ/WBxhBRZy3s3ZH45I7n6mC3vFS gPZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=JwAtZe8jz5YxrvQz9XS9HYjJjhraiUzd6G8Bnn/PfQ8=; b=Ws4MbyKSeYbiWj/V7JdFQUVmtyBJxrA4RClfBajVgok4cHgflRPkNFhvTq73KhAN9B ry4SAzO04Sin8ScCxVkum8ENbyCVnW7Kx5/HZq4KWOhGuqsCvRddR/k+YzsXQ/xK+4Xz 4BeH3xq+0EuZWJyoLGX/bWjP+WOYw3QbTIqr/m0oAgus4fQbjexp+pTUrVEg86EaxO5+ Mwxx3sA6TUfgHqo78AcUlcmqVFaon1YeFeQkgtJbuXmXXed3vrkNTJAdAEM2UKpld5mG P+D3+tZ5peiwMxQ4DRRJ+Jn7BaxKmcoFaOeuW8YmGNvFsDEuX62mNC1KdeR80omdxR/g ILOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MHCFBPPG; 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 mj22si2295284ejb.215.2020.12.06.19.33.57; Sun, 06 Dec 2020 19:34:19 -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=MHCFBPPG; 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 S1728878AbgLGDbR (ORCPT + 99 others); Sun, 6 Dec 2020 22:31:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:51682 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728561AbgLGDbQ (ORCPT ); Sun, 6 Dec 2020 22:31:16 -0500 X-Gm-Message-State: AOAM531fmYpUdSB0X9LzVcnLceUz7cLGxg2nb19F6VgI1CpHZyfmgCFj LUa+dsyU1BYR4OjqNd5a4IJf93YIRvWyj0V886U= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1607311835; bh=eUFEhztFtJTOa9eLt/B7ip1iRdwwveiI7Iz0zAA+e4w=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=MHCFBPPGIBbBzQoTfSE+6TXG+czMkoFtneP7hOKgWTB9get5ooKKySHHq4wSSSHuu jnwpdLNM5HQPCKsNzuikeUfH+oTnYsw+JtnarFq1XxpoIVh4dA5bOjXNNz1hXmnzEg 8D7JGBu2XBvUgnAAyZrJYedpgLVmPjy1DZq5h6VH7CQCMkkBDbVSgf9GYiYwvPVJ0S R4BMQguCVtuSekDaOCc9Q0v6AC0sq+9T/IhRwyvTH/Fh8b6J+/rJXhtcv9GzNVickx kRx17yyvDMEWnwuWeiZbdloL2KSo2n3w7GLWAGCMod1qHa9Ei94otUbLbqVPJRml0+ PDuXmAcN/SqdQ== X-Received: by 2002:a9f:21f8:: with SMTP id 111mr10681980uac.115.1607311834678; Sun, 06 Dec 2020 19:30:34 -0800 (PST) MIME-Version: 1.0 References: <20201118071724.4866-1-wens@kernel.org> <20201118071724.4866-2-wens@kernel.org> <1737702.WCGJIqnLLh@diego> In-Reply-To: <1737702.WCGJIqnLLh@diego> From: Chen-Yu Tsai Date: Mon, 7 Dec 2020 11:30:23 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 1/4] PCI: rockchip: Make 'ep-gpios' DT property optional To: Shawn Lin , Lorenzo Pieralisi Cc: =?UTF-8?Q?Heiko_St=C3=BCbner?= , Rob Herring , Bjorn Helgaas , Chen-Yu Tsai , Robin Murphy , Johan Jonker , linux-pci@vger.kernel.org, "open list:ARM/Rockchip SoC..." , linux-arm-kernel , linux-kernel , devicetree Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ping On Wed, Nov 18, 2020 at 4:49 PM Heiko St=C3=BCbner wrote: > > Am Mittwoch, 18. November 2020, 08:17:21 CET schrieb Chen-Yu Tsai: > > 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 suppo= rt") > > Fixes: 956cd99b35a8 ("PCI: rockchip: Separate common code from RC drive= r") > > Fixes: 964bac9455be ("PCI: rockchip: Split out rockchip_pcie_parse_dt()= to parse DT") > > Signed-off-by: Chen-Yu Tsai > > Reviewed-by: Heiko Stuebner I'll pick up patches 2-4 separately, after giving Rob a chance to look at > the simple binding. > > > Heiko > > > --- > > 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/contr= oller/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 *ro= ckchip) > > } > > > > if (rockchip->is_rc) { > > - rockchip->ep_gpio =3D devm_gpiod_get(dev, "ep", GPIOD_OUT= _HIGH); > > + rockchip->ep_gpio =3D 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= "); > > return PTR_ERR(rockchip->ep_gpio); > > > > > >