Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp510139pxb; Wed, 3 Mar 2021 08:33:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJxlg3/IjrOP0CSdBAnS3LoX7uu7yLfma9pNhK61RWaMa8org66d5sWB32myhGyTwHmwxWnT X-Received: by 2002:a17:907:1b1f:: with SMTP id mp31mr26224012ejc.348.1614789223959; Wed, 03 Mar 2021 08:33:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614789223; cv=none; d=google.com; s=arc-20160816; b=gfYk2zggazPHG7dVydn5ucAmgccOJN06AroWrB0MrRHomuyiF2v0RMaAVkDKJBGgJj Q2HeKMnjC1bOuTj+hvDAAkNEx828hkENkcogwYbrGLiP5o0V0GHzZpwAIWEeWXgHUH+O iFX3otUPTqu0Fo/dRCTU8WZXUz8CWP2VjUqN6RPWE0Y88jQwy17vmqRBr77dU92CFBpX tEIMM4VbhkcYVb0Wq8eLeT+Ep2D2DblWQ0NhbTop8CDFGQXMXQY67Cb6JmzsJsAEb10A pLZ2w5ycTsdMuj3yOum8+eX7ylcmWp0SL5J2Edpj7jg4ntUp1ksxANvAkXOndw5FsH3b zmOw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=aZSsKIKEe75Aacn6veNmPtGgF4uhbELGaBc2vp42oAo=; b=uBSt/NInaVeQGBzNXYINZ+Vh3vmG5ZMbK1R6fRXLa2pALns/jvKzTracu96pY7dXE/ h9YAfY8g6+DCF3WeK64cuurxiF1AyAcOO1VZlQtXrgC2nOM78dfVekOayNWcFP/zocmR Fzd9AvPIjxMa/sIPr5no7X6OiMMdhklAiFbR7KXucb7KqFAnrim658SrwizV3+QBlF9h Or/tN+74MG4EbAEyOpNF4nmkBeXrejHLforikkH5rJkWCH7/rzpVHVZ5DveROpPzE/XC 0jCJ7sgA6NyyESPRzq3iRO3nH/lQ/CtcpCLLAea+vPXVq9xpyn6CZMC/Hly6C84J5jjq p2ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0kTU0XTp; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bs25si16044591ejb.238.2021.03.03.08.33.02; Wed, 03 Mar 2021 08:33:43 -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=@linuxfoundation.org header.s=korg header.b=0kTU0XTp; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239395AbhCBAAb (ORCPT + 99 others); Mon, 1 Mar 2021 19:00:31 -0500 Received: from mail.kernel.org ([198.145.29.99]:38266 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232800AbhCASSp (ORCPT ); Mon, 1 Mar 2021 13:18:45 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id BD1F06506C; Mon, 1 Mar 2021 17:23:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614619430; bh=jf4Ra3bK+Jrx7VR5X/cspBEB9XBNdMpA9TNa5h8NlsM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0kTU0XTpHe+Kc1x3dlO1MtqsKm2cJhGVzk5Z3Ps/ZvwbCXMCEPeQMDfDXJGnYM341 FrF14vu/YngGAhhWFGTPD76p42zp5FGoCJoMEOa9vI/xoDBpoB/E1ddHvWmmahDJIS FtuQENdUVOsGh+CXtpUwma1pgypIwluJCOHiCZvM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chen-Yu Tsai , Lorenzo Pieralisi , Bjorn Helgaas , Sasha Levin Subject: [PATCH 5.10 451/663] PCI: rockchip: Make ep-gpios DT property optional Date: Mon, 1 Mar 2021 17:11:39 +0100 Message-Id: <20210301161204.203592734@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161141.760350206@linuxfoundation.org> References: <20210301161141.760350206@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chen-Yu Tsai [ Upstream commit 58adbfb3ebec460e8b58875c682bafd866808e80 ] 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(). [bhelgaas: tidy whitespace] Link: https://lore.kernel.org/r/20210121162321.4538-2-wens@kernel.org 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 Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Signed-off-by: Sasha Levin --- drivers/pci/controller/pcie-rockchip.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/pci/controller/pcie-rockchip.c b/drivers/pci/controller/pcie-rockchip.c index 904dec0d3a88f..990a00e08bc5b 100644 --- a/drivers/pci/controller/pcie-rockchip.c +++ b/drivers/pci/controller/pcie-rockchip.c @@ -82,7 +82,7 @@ int rockchip_pcie_parse_dt(struct rockchip_pcie *rockchip) } rockchip->mgmt_sticky_rst = devm_reset_control_get_exclusive(dev, - "mgmt-sticky"); + "mgmt-sticky"); if (IS_ERR(rockchip->mgmt_sticky_rst)) { if (PTR_ERR(rockchip->mgmt_sticky_rst) != -EPROBE_DEFER) dev_err(dev, "missing mgmt-sticky reset property in node\n"); @@ -118,11 +118,11 @@ int rockchip_pcie_parse_dt(struct rockchip_pcie *rockchip) } if (rockchip->is_rc) { - rockchip->ep_gpio = devm_gpiod_get(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); - } + rockchip->ep_gpio = devm_gpiod_get_optional(dev, "ep", + GPIOD_OUT_HIGH); + if (IS_ERR(rockchip->ep_gpio)) + return dev_err_probe(dev, PTR_ERR(rockchip->ep_gpio), + "failed to get ep GPIO\n"); } rockchip->aclk_pcie = devm_clk_get(dev, "aclk"); -- 2.27.0