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=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 07E71C56202 for ; Wed, 18 Nov 2020 07:18:09 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 710AF2223D for ; Wed, 18 Nov 2020 07:18:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="2LBxhjMx"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="jlfq2kaK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 710AF2223D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=crts8sjEtUo6TxV+xHOve6gPpzpveI2B2nCz3SsV+NY=; b=2LBxhjMxB2UfyjxWKs6IrxqYJ GQBLwRVmJWi7MgkQF729LpJDN32lhzDNHanWTY7vANFN4KnVhxJixlk/MnGmcxbEMtWPax1xoW11p P+YissVLZJ+leuhhxq1m8Vfn/f9Xrlm6AOhxp1f8tDiVsGwN/domTGQyNRWvPGKsKPcTCsimWID8b PJcGkjkC2OsTBWVlYDTKd67XsmufT2hao+5508ua/XFGPFw9G5c4Q9Hb010C+QCYiM9zBgf05QVfU JLDnACstCoAJgJdFHjCwcUckzJkgYdnijg3uQAWx+lnx03Q+Fhp43SMosHoXaRM/t9ipROgKu89CQ njRoMbzDw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kfHil-0005Zr-8P; Wed, 18 Nov 2020 07:17:39 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kfHih-0005Xa-Ri; Wed, 18 Nov 2020 07:17:37 +0000 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 2B3AF2466D; Wed, 18 Nov 2020 07:17:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605683854; bh=Yo6ZpFkYXKBk3boUDcQprLNpM/c9l59uyLcqPIeqpNY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jlfq2kaK4KtHb7if+ujXXFifXLFDQpk5mqxoydDv4R6lrU0sbRd8au/cOrKnIUPbb PLqkobdTn2t78/BnodKm22OieiXpiNPohmi/FpkZpQOUfoGuEw3D3vCf0iZF1Coebq 0JAIkSwuXsIfdu5JmhPmB+EH0qeadkHK/+3i2Xuo= Received: by wens.tw (Postfix, from userid 1000) id 7DBDF5FBCC; Wed, 18 Nov 2020 15:17:31 +0800 (CST) From: Chen-Yu Tsai To: Shawn Lin , Lorenzo Pieralisi , Rob Herring , Bjorn Helgaas , Heiko Stuebner Subject: [PATCH v2 1/4] PCI: rockchip: Make 'ep-gpios' DT property optional Date: Wed, 18 Nov 2020 15:17:21 +0800 Message-Id: <20201118071724.4866-2-wens@kernel.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201118071724.4866-1-wens@kernel.org> References: <20201118071724.4866-1-wens@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201118_021736_017649_CD296918 X-CRM114-Status: GOOD ( 14.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, Chen-Yu Tsai , Johan Jonker , Robin Murphy , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 --- 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); -- 2.29.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel