Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp123905pxb; Tue, 17 Nov 2020 23:21:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJxbQbu2WFJWURigMC6VmOUTP0WlXL/EHfMbmGRoL3rGEKoszddPiRKETuM4rKrmlK/KG18j X-Received: by 2002:aa7:d356:: with SMTP id m22mr24447564edr.270.1605684098907; Tue, 17 Nov 2020 23:21:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605684098; cv=none; d=google.com; s=arc-20160816; b=vE7hhcMbsKzb+jtblmpixX5mSbnHjV2Pg3jZ2NJxZobS2CdFkiPxbYHY7tGmoIrM65 n9X5xRDqlpbtqsiwUQ5RZcizCwqqnGI27MY1z85+ft7yJA6fLP85z0JEZusrSJFq1+1F GHtgRCnvVgSIoct/VeS+0XyzmQf3PHgPuryGZQNNJ7vWVxEH7vy6eNPYLhVbt/9Y2NxU TNQ8pbyUEpwQEe4YpLYawtK9qvdraNIIcOi6ShwAB1EeVbvbXXIB/g7v2kgRHdOTbJNj 6Ej7Yh8eBC/g9sqDpKNYVUgXX8b4ITmEzn407NbFfJbjVjPg+g3cy5mjQ3nSRO5FMDet lr6Q== 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=fFEnppKuN6RaXy5FIvb0fUAK+PrTrKx9JfWX5zCgiKw=; b=hdkrEpbfH62G109Vjt7olQlwIvwk3bL6LLCcx3HlT5eaOg8zwWExCxMtwIczDrvjiP UauCuntaJdS3Qltv9iRdX/e3fiOZUmovBFTkzY+tyG5DICgekTcAiMPATu8ZVfNhDP5q Av22UYh+9aTUbp3w9/dcTvBFN2T/nHcszQ6NMdJV6UzpQcbmWW3IlrfjxW4S0I49v+xc E++KLZVNh0BzUNZKY81xCjTLrxyAHkFIBVnDDWdQ+Mqav28XAaXwk8Vc0jGmZLJVXHeV GWlqpSTKjvm/M7RfRCO/TW8hKx1fRf6vTIVcMGbyDfWoA/llWu3nmIyg1qCb/gPgV6lD L9KQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jlfq2kaK; 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 r1si15358257ejz.334.2020.11.17.23.21.16; Tue, 17 Nov 2020 23:21:38 -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=jlfq2kaK; 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 S1726746AbgKRHRg (ORCPT + 99 others); Wed, 18 Nov 2020 02:17:36 -0500 Received: from mail.kernel.org ([198.145.29.99]:54516 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726683AbgKRHRf (ORCPT ); Wed, 18 Nov 2020 02:17:35 -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 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 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 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 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 --- 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