Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp2914525pxb; Sun, 15 Nov 2020 23:58:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJwfEX8lMf6Lhxma5xJIMN/VQI5kkHBGCVmdE/FWgzFCxxZml4aWyFO4PLxcyZxX3BlKWl1D X-Received: by 2002:a50:930f:: with SMTP id m15mr14878234eda.112.1605513502689; Sun, 15 Nov 2020 23:58:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605513502; cv=none; d=google.com; s=arc-20160816; b=eXsiFEKtE6HtZb1ffRcpJEB07C/1x2vKj+xPqcU3iNB3wBmLigT28swHGK9hYZKZaX onCakUNmcfqUjUY+yOzPclZBWdugg2gAo40N+OS0MFSxi/voE/kztldD4XaqDamupvwA SVLerZo/1lFS4eSTEYa0tnqkD0heHORn2PENKQtqkSRA5iT5/hPc8r+FxEQBeY19WPFJ 5/NRPUiDbQOb1oYvCffxGI0TpCFT1g3GwYE9/AwLnqUtlMvV1D2//N638ZLrNDc8onbx nJ6fcwVRzioL52Neq9jCGTGBZ1KHoXU0Qath/wT0zxgO570g2rZCy6OHs3JC1n1sVp5X bmlA== 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 :dkim-signature; bh=TIiR8uTvdJhp5SfWtqADY3EecNLuFGc2KeckUBL8t1I=; b=bkYbyZ5J5thA/Sjbf7ovOaBDZRrU/fMb6W0G41AENMgvYXK314U58EJayLel2NYV4R nqWlNMzoaccQiy5Lw7ZaM+j0OIBEpO1rZkpKzLjqdEuxZ49ql43Ivo3UcmVwYFN9p5rn Re6NDR5G4RRBT+6WpVkbUK3JNd8azxwi7k4zwQTmSCT4V7pYIEsAfFR7QJZPQyXQkauf GQoNYokSP89Cf0k6LTIYNBJDFDOjtMWern27NeF2CF73c8ZhafZ1c3Si3hZFMghIWBnf s/ELOUO8lZbCjtm90tB+rcUo0iaqTDlYHHViXhNNBsBPC/1mNJfxNLwaurS9eEhMf8Gy OlQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SV4UAqJ3; 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 cd2si10776627ejb.215.2020.11.15.23.58.00; Sun, 15 Nov 2020 23:58:22 -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=default header.b=SV4UAqJ3; 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 S1728014AbgKPHyw (ORCPT + 99 others); Mon, 16 Nov 2020 02:54:52 -0500 Received: from mail.kernel.org ([198.145.29.99]:48798 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727885AbgKPHyv (ORCPT ); Mon, 16 Nov 2020 02:54:51 -0500 Received: from wens.tw (mirror2.csie.ntu.edu.tw [140.112.30.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 985612227F; Mon, 16 Nov 2020 07:54:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605513290; bh=OwKfTuKSKYuNfz4bpxDopuSuiAxbNH8GnCNtt3jnfq4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SV4UAqJ3/GvudI4C/bJtccFBLeCbmt5tfhhoqzeIjrhMCFWXJeSa5bncjlXDA50Tn uUglydtauKc3wdHaHZ1Nkgf9OwRKvxJZim3ymWdDDmd5O3tQn8bilD6t4bRyj9CqOc W/SAAPttiWDEE6K6yeFJnDnePqtrALkukAaNWitw= Received: by wens.tw (Postfix, from userid 1000) id BF4845FD7E; Mon, 16 Nov 2020 15:54:47 +0800 (CST) From: Chen-Yu Tsai To: Shawn Lin , Lorenzo Pieralisi , Rob Herring , Bjorn Helgaas , Heiko Stuebner 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: [PATCH 1/4] PCI: rockchip: make ep_gpio optional Date: Mon, 16 Nov 2020 15:52:12 +0800 Message-Id: <20201116075215.15303-2-wens@kernel.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201116075215.15303-1-wens@kernel.org> References: <20201116075215.15303-1-wens@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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); -- 2.29.1