Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3220213pxb; Mon, 16 Nov 2020 08:45:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJx3HrakE00EYbDlPlsns4NlkVZA6I1V1C0ZYFJuwmNXEOkIm0RVoQqdB62LxTDjY1T3XYNb X-Received: by 2002:a17:906:5e02:: with SMTP id n2mr14541985eju.295.1605545152165; Mon, 16 Nov 2020 08:45:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605545152; cv=none; d=google.com; s=arc-20160816; b=iyP8RIUysFSDAnQg8h5q0H29NVcNFzNLTUs8Z3MqNxhQD+JgrusVajIrI6+rS1OAur z307fzJ7H0Or9PiE+3Z0b+/IQwy/La2LH4ZKrWixC/ki0JrSv/a9Tpp3iryZQxlRbO1a p1stw3hDbWoOH/3Wj4OTbft+jTSfmT09qBBy9aZcW55au6n66l4DhpvqzWXXxxHt/K7w f+iLYoVKObDPTTOZEVk7RLVyB+3JN5EeYsVA7oneSOup/sIEelZkGt4zeFit825T2jWl gvCNzkRBAvqKwEdhRCYvmfIqgTprEz/7rFkQ/do0GkQmsg98DMF5fnrXamAwZ9kf5Kqi NSGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=vhHiG37Bv3ZxBl9NFUk+Cy2sWeEsELf2gJBqrwGniiw=; b=VQ1NGdxSO45Fe8extk18iVf7QxUlR8BKNnP9ryaChEdiRg6oZ44JO9If7TSxV8bPpO fSDZTJx8ByCokJLMT2Pe5YmqDY9SKdWQYIRTR7QSwsO81C0vaYacgvT9xMz2WXhuuwfl qyiA3MLzeXWMZpKcq7h3auKBLJytm3BtDuoFnrlimzl5qss6PEEyWItYVIA25itSapAl 7qNZr5/8s1wuRwtPvFK3V+VUa5PrEf7l77yKBGR0hGv2nURFKUvKyBscdJXbaDozGY8O ayaEtavQe4kWvFpzcovf9mhWzZUR6nti5EJS+RdiS/DzThkzu9HGqFnfS7VCoD6PhnjS c1UQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sQ5aXPh3; 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 k7si12145178edo.371.2020.11.16.08.45.28; Mon, 16 Nov 2020 08:45:52 -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=sQ5aXPh3; 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 S1732260AbgKPQmD (ORCPT + 99 others); Mon, 16 Nov 2020 11:42:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:58972 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729689AbgKPQmC (ORCPT ); Mon, 16 Nov 2020 11:42:02 -0500 Received: from localhost (189.sub-72-105-114.myvzw.com [72.105.114.189]) (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 8A6AD206D9; Mon, 16 Nov 2020 16:42:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605544922; bh=TgH1abjAGKm1AI19eKqktN7to1FFPzXHleFxcxbkKI8=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=sQ5aXPh3snFjQmczM+VPazL8s/aZevGo5eKBMXnrsHdeK2P4LWLWwhRgrP+4tjo8v fW5whkpjlstLvmNNEO8dlnYlFNu6k+v/nUNQX7WySZoxfEoEU88ZimYtMLQAhFVB1f GulmiaLGww5TeaexigJXCTBgVktebrIBLAsYafiM= Date: Mon, 16 Nov 2020 10:41:59 -0600 From: Bjorn Helgaas To: Chen-Yu Tsai Cc: Shawn Lin , Lorenzo Pieralisi , Rob Herring , Bjorn Helgaas , Heiko Stuebner , 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 1/4] PCI: rockchip: make ep_gpio optional Message-ID: <20201116164159.GA1282970@bjorn-Precision-5520> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201116075215.15303-2-wens@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Run "git log --oneline drivers/pci/controller/pcie-rockchip.c" (or even just look at the Fixes: commits you mention) and follow the convention, e.g., PCI: rockchip: Make 'ep-gpios' DT property optional Also, you used 'ep_gpio' (singular, with an underline) in the subject but 'ep-gpios' (plural, with hyphen) in the commit log. The error message and Documentation/devicetree/bindings/pci/rockchip-pcie-host.txt both say 'ep-gpios' (plural, with hyphen). Please fix so this is all consistent. Details matter. On Mon, Nov 16, 2020 at 03:52:12PM +0800, Chen-Yu Tsai wrote: > 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 >