Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1002096rwb; Wed, 7 Dec 2022 07:32:07 -0800 (PST) X-Google-Smtp-Source: AA0mqf6MbFydFlWqCCazyzIf1f04dyBUpaOTpfFnePDCRwPv515JEzBf6hdCMDVtxB9Sc0xDWGlH X-Received: by 2002:a62:168b:0:b0:574:a82b:d290 with SMTP id 133-20020a62168b000000b00574a82bd290mr61476764pfw.42.1670427127535; Wed, 07 Dec 2022 07:32:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670427127; cv=none; d=google.com; s=arc-20160816; b=z/eCoPQfxGNTQnKRbdMLNg4J0jM8J0hytcL+311Cyk5HzRshdBhTwfgvOlt49HpWFW dj1kR6qrEUzk50IjF2qBP9Ia8pBxeC5z0w8lY+CTjgDtmlZ1yl8BlJT61jtLF80w+d5v TAUV6XN5Ot03H9ztuNtA5Z+umPLLT9OWNgdV50ShnofUrWe3vhw8KK23qttFvgnS5cFz DLyAkfMjmfshld59ACcB3+t/+79yB0+nTO8/y9VAN/WeWffSBhvWHb2b/JF/lLXrA0qE pvO5nu3ShAC5ICckkf/pxrs8yevD60RiGhQoHQTyiX6/VDEBXh6lYJfX10VXUR8L9kk2 Qp+g== 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-transfer-encoding :content-disposition:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=JzU0jCZOlAlHkCWTI688amX6YYNi8mXWrQA8zfqD+S8=; b=KXuTzXgPPvJs3QJ0KtNBZ3U9d1M44Uu8FfglQKY01GGFtB0Rrq7HxegnFEjRQe9x2Z jo+JEOk9AzEe4RBn3QAwc6bGRXrMdPiyjowYOLnlZNSQ9ryKPtc+xhAowwlJYNCZ6PCO peuGrxub4vcYSHEEo6zIZ+vAleDC1wk4NrnQ1/SSdDtifEPH4ikAfCPF99rqi6aoDH7Z HCts1WiBRDlCSKdRzFbH5RpgW4a3X2ShvBvRKblQaOwt6fPa5YJ6uNbAKqclGnFyCamI EFsxITq1QPKWOrWIIFJQEBqTQcWNHv+0ioFanfwHvGTFiSy+HYJd4YRy2Ur3aOK8iZan yEBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OfTWS5hU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s7-20020a056a0008c700b0053b36138dc5si22466024pfu.222.2022.12.07.07.31.57; Wed, 07 Dec 2022 07:32:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OfTWS5hU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S230051AbiLGOd5 (ORCPT + 76 others); Wed, 7 Dec 2022 09:33:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229677AbiLGOdz (ORCPT ); Wed, 7 Dec 2022 09:33:55 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F9424874A; Wed, 7 Dec 2022 06:33:54 -0800 (PST) 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 2D00C61A21; 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-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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?r > 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/controller/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 = devm_gpiod_get_from_of_node(dev, dev->of_node, > - "reset-gpios", 0, > - GPIOD_OUT_LOW, > - "pcie1-reset"); > + pcie->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW); > ret = PTR_ERR_OR_ZERO(pcie->reset_gpio); > if (ret) { > - if (ret == -ENOENT) { > - pcie->reset_gpio = NULL; > - } else { > - if (ret != -EPROBE_DEFER) > - dev_err(dev, "Failed to get reset-gpio: %i\n", > - ret); > - return ret; > - } > + if (ret != -EPROBE_DEFER) > + dev_err(dev, "Failed to get reset-gpio: %i\n", > + ret); > + return ret; > + } > + > + ret = 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 = 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