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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 87625C352A1 for ; Wed, 7 Dec 2022 14:34:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Owner; bh=9itmLnYcsP3sGm+7xtgZ7n7g196abD4/20ZzeGBxK7w=; b=dWy4S3SN5VK5l0 5ZS/EhrS8nKs94skBQWkROB7vdVLHGuQD8E7KSSHGxxDTa+srNENjA8odrgUGaOyaazU5SPRBpmEZ DWMXlyzTDGYY3RauRrs1nj+WSjiyBuOqUvqSgq8oAcPsDvCav7pCtGdFxhYLjNlWgrxSk+60o8Sq/ Zy+rgd8+NB+uu1d5e5cSa5lT58LvM4VQq5RauOjIdK9pJneUQYHsfuKr5VG8OeFJisFe6uxoAwZWL YEbJiqV4Z2dth67ZAYgw3oQv3BfO6hdNsIbyLCFLHPD0Hf7W4bqfCDjCRxpi3+Fifgoa60EYFWMwl 1V65lzKB9ZGFf5+txIEg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p2vUj-004x33-2n; Wed, 07 Dec 2022 14:33:57 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p2vUg-004x1D-Ii for linux-arm-kernel@lists.infradead.org; Wed, 07 Dec 2022 14:33:56 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2A437619E2; Wed, 7 Dec 2022 14:33:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61F9DC433C1; Wed, 7 Dec 2022 14:33:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670423633; bh=c+KvtVD0WLo5gwEphtibdZzJjkwLKgNGQrH2V1E1aXU=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=OfTWS5hUSadr7o7xtdJ0R+zDfShXDpQX3tRV0YLBAE7y1YdiWf/4TVnd6XbwyfW7D 9pshZ5piIcEEBKGAYOwT7RUDqxscXns3qktQUeysF1bbMy9pqGvtqXK7NkBQj+jEGh /En73LUpdGivrTIqPQyFldJ4/nB48m+P9QyqGDgqo93wMn++Ajsb4tc10erl+gKDZo Ct+IenQvCaxiOaGQ6dHb8iaA9ISMa6FElcpXfhZ3cXxIpWqd5VMNravgNPjvu5xcNQ HZ3INZyw87gUmXf31XYLPufE79jmKXRfW7vhhprjOPwcrq1DBnbKH2i4JhAr/q3LD7 VCg56qtXC+jmw== Date: Wed, 7 Dec 2022 08:33:51 -0600 From: Bjorn Helgaas To: Dmitry Torokhov Cc: Thomas Petazzoni , Lorenzo Pieralisi , Pali =?iso-8859-1?Q?Roh=E1r?= , Rob Herring , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Bjorn Helgaas , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [v2 PATCH] PCI: aardvark: switch to using devm_gpiod_get_optional() Message-ID: <20221207143351.GA1439513@bhelgaas> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221207_063354_716419_4A982FC3 X-CRM114-Status: GOOD ( 28.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Nov 14, 2022 at 10:42:25AM -0800, Dmitry Torokhov wrote: > Switch the driver to the generic version of gpiod API (and away from > OF-specific variant), so that we can stop exporting > devm_gpiod_get_from_of_node(). > = > Acked-by: Pali Roh=E1r > Reviewed-by: Linus Walleij > Signed-off-by: Dmitry Torokhov This is unrelated to other pending aardvark changes and will help unblock the API removal, so I applied this to pci/ctrl/aardvark for v6.2, thanks! > --- > = > v2: > - collected reviewed-by/acked-by tags > - updated commit description to remove incorrect assumption of why > devm_gpiod_get_from_of_node() was used in the first place > = > This is the last user of devm_gpiod_get_from_of_node() in the mainline > (next), it would be great to have it in so that we can remove the API in > the next release cycle. > = > Thanks! > = > = > drivers/pci/controller/pci-aardvark.c | 23 +++++++++++------------ > 1 file changed, 11 insertions(+), 12 deletions(-) > = > diff --git a/drivers/pci/controller/pci-aardvark.c b/drivers/pci/controll= er/pci-aardvark.c > index ba36bbc5897d..5ecfac23c9fc 100644 > --- a/drivers/pci/controller/pci-aardvark.c > +++ b/drivers/pci/controller/pci-aardvark.c > @@ -1859,20 +1859,19 @@ static int advk_pcie_probe(struct platform_device= *pdev) > return ret; > } > = > - pcie->reset_gpio =3D devm_gpiod_get_from_of_node(dev, dev->of_node, > - "reset-gpios", 0, > - GPIOD_OUT_LOW, > - "pcie1-reset"); > + pcie->reset_gpio =3D devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LO= W); > ret =3D PTR_ERR_OR_ZERO(pcie->reset_gpio); > if (ret) { > - if (ret =3D=3D -ENOENT) { > - pcie->reset_gpio =3D NULL; > - } else { > - if (ret !=3D -EPROBE_DEFER) > - dev_err(dev, "Failed to get reset-gpio: %i\n", > - ret); > - return ret; > - } > + if (ret !=3D -EPROBE_DEFER) > + dev_err(dev, "Failed to get reset-gpio: %i\n", > + ret); > + return ret; > + } > + > + ret =3D gpiod_set_consumer_name(pcie->reset_gpio, "pcie1-reset"); > + if (ret) { > + dev_err(dev, "Failed to set reset gpio name: %d\n", ret); > + return ret; > } > = > ret =3D of_pci_get_max_link_speed(dev->of_node); > -- = > 2.38.1.431.g37b22c650d-goog > = > = > -- = > Dmitry > = > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel