Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp164304pxb; Wed, 18 Nov 2020 00:54:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJypGNUg+PAWrTC3euoD4vT0QjyCw1w/gY2Va7/GK809a6wr0gM45Om2i973Ml5xKk4ToQ8u X-Received: by 2002:a50:ec10:: with SMTP id g16mr25609135edr.63.1605689643913; Wed, 18 Nov 2020 00:54:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605689643; cv=none; d=google.com; s=arc-20160816; b=N/YUpm8NmD9dw7i5Um8hn2ziHK5T6u+mBWgOaFidgls8SjSO0uxP1iFiU/TpxXK8lh BX6Q5T0CwBIrl1fB541eNug7/LdbygvWEg6HEbKipaxV2J3kx3SjWpgkBr6+dPcSBore 3nwwuHLplO6Wzcp9z0OuWfZVZg0EiB3zjWMg6UsYKo1Ptfs7+JD+7yFsbVg45+b+gBH0 5eVAVEy08ywB4sSGJ5naUrmxVxc6vyqwdLt0ISwLu1+UvBYvdXcwHcFovWGmflcnDhpH wRiEdArkIbN4OQtFpbygMR84l9zSVRUkhJYOQNJ4rDdRYbKVd58tPJ2OoN8it9FKM27z eLRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=O30k99YU6A2Y53n0NjUAVhBDZE+GM0i2dULZyGi7+E8=; b=TeSsbSNGeYgRSxPAGg+7seaqjY4kBXsYMMUJARc7+sT1TdrRyyuXG7Y4PuAz2d1Hir YV6DluWe4dUu3ZOHlby0/d7bN0SLubcg546/YeqOEEf6XYkevkUd2qziQxZPd7/IK1Ec digaXAOl1R/5xBmx5ZzER3wJTmNsXuJeBrYbFOQQg6JugNqLjSa7C4SN9VcklHfTjgtF pcsRNpbRZUTYbPYmLm5bjL/a7+hzWVFv5ZM+3ASjV2p0wzGgZcsnwjH/CbJqqdqLJNKu vdZTpgdDIrjvlzdK/s/RUQ4Ztj1PkzZrS/4Keu/Bs5jZhwCcP8Cj1xq4MYhlUZ7D66xE rOEQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hh1si747649ejb.605.2020.11.18.00.53.40; Wed, 18 Nov 2020 00:54: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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727457AbgKRIuC (ORCPT + 99 others); Wed, 18 Nov 2020 03:50:02 -0500 Received: from gloria.sntech.de ([185.11.138.130]:58934 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726964AbgKRIuB (ORCPT ); Wed, 18 Nov 2020 03:50:01 -0500 Received: from ip5f5aa64a.dynamic.kabel-deutschland.de ([95.90.166.74] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kfJ9o-00056u-Q4; Wed, 18 Nov 2020 09:49:40 +0100 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: Shawn Lin , Lorenzo Pieralisi , Rob Herring , Bjorn Helgaas , Chen-Yu Tsai Cc: Chen-Yu Tsai , Robin Murphy , Johan Jonker , linux-pci@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH v2 1/4] PCI: rockchip: Make 'ep-gpios' DT property optional Date: Wed, 18 Nov 2020 09:49:40 +0100 Message-ID: <1737702.WCGJIqnLLh@diego> In-Reply-To: <20201118071724.4866-2-wens@kernel.org> References: <20201118071724.4866-1-wens@kernel.org> <20201118071724.4866-2-wens@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 Reviewed-by: Heiko Stuebner --- > 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"); > return PTR_ERR(rockchip->ep_gpio); >