Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3159528rwb; Fri, 16 Dec 2022 10:52:01 -0800 (PST) X-Google-Smtp-Source: AA0mqf4IR+TwYGzBDYNP1DVhLjEYpb1gIdxBYY8O0ej1zrnPmynoyyJE/MHN/WuQL5Xhr3K+zkyM X-Received: by 2002:a17:906:2554:b0:7c0:db53:c599 with SMTP id j20-20020a170906255400b007c0db53c599mr29298179ejb.22.1671216721203; Fri, 16 Dec 2022 10:52:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671216721; cv=none; d=google.com; s=arc-20160816; b=yptVas6zr5YRY0uMx+aPeuXIv5FbDDkI3qPxKKKq5s/I/uXIHcM1pcbehCATLopuyB JZq1q+T2M8OppK4jbDvlYuyziUSleAmcwdLC6ysC9jKv6ZmhLguBxe35pCxuWdli54JW jbmPf8bclRWXJlS1pQ74IxbXF23EDiKgUSs7UALFxsaigXby9yqNF9ftTmcKFhvFMZuG 9ejJxbw90FqDLwJkLKhdJ30mnRcPYNitgAuU66MH7fw76zcA8Yaef7yt3bs330R81CLo 1Sz8m0aR+BXiqhHuke8puQNkHu6LHjQX1tWXblolD9hExG354CQ3GMa1G1FMyYW09Lux KejA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=cqqVTvdNhVrgT5z9SheIUtUpsOEz0eCVjQa81PbrDCI=; b=XCm3vOLK4Jb1JtowUAkWNvpCx2mRquQTdEl8i3Z6PlkQ5bdrDum3jNJgHXB5u+BNEM XuDSD2xDaLtS2hdldeMtCy4msYbxhLg9WiG5leQoVpavlo/+6VC87flPugrmRtUT53nh yGShtVkigqrfE98f74UzmNiVOEcnJ/pKz4YtNI/hQa/Wqp+qOnVkhXtn+Y59QqNFLjc1 jwGIRx2AnDyH9GdZWN7U/nG1HufCM9eKFcZhADN90qizDbrCQ4+5TfbI6236iEZ7DuHF fqyfXLpjYyIY9TImkzp07kZI2y9c0GV5985WdZrFP8p5B11dSLCUgWF2HzHIHebcZkx7 Yy5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aD2KCvdg; 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 va28-20020a17090711dc00b007d6648874aasi2442493ejb.552.2022.12.16.10.51.45; Fri, 16 Dec 2022 10:52:01 -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=aD2KCvdg; 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 S231429AbiLPSZf (ORCPT + 69 others); Fri, 16 Dec 2022 13:25:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230089AbiLPSZd (ORCPT ); Fri, 16 Dec 2022 13:25:33 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 430A553EF8; Fri, 16 Dec 2022 10:25:29 -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 ams.source.kernel.org (Postfix) with ESMTPS id E20C6B81DD8; Fri, 16 Dec 2022 18:25:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6BF4EC433D2; Fri, 16 Dec 2022 18:25:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1671215126; bh=4XtEoEvMYyg+OLEZfHG9djBuFTM7o2ZQCFES+gxEroE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aD2KCvdg3kKv09BaCnVXMz09pfqHt+WN5mHE937fM/UB7lIsiumYRFq2gH3p2ubL0 b+v9L0fuJZyXwbcykzfXKi1zWwno00rdfpGtd8WLU+TTNfE3LdHP9FredI46xwgi03 kx1euGydfduw0D5ttm419X9ds07l5WaKr4vD5OaRGW/+5PeSIVWexnE0Zu7PjcOMR6 88sF0++26Ul5MhBADAKPp/gstCMHmfrirVYMMelP8ecI4/BiYSBW60rE6wV9L1WQrs YayESk9QhiMXchYskO9jbZ4GHhk2HKLfMpH+CI3tBm2b52fBYX6psvP4Ko6ej2N9x8 3+pL0cOPNLbWg== Received: by pali.im (Postfix) id 22897711; Fri, 16 Dec 2022 19:25:24 +0100 (CET) Date: Fri, 16 Dec 2022 19:25:24 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Bjorn Helgaas Cc: Dmitry Torokhov , Thomas Petazzoni , Lorenzo Pieralisi , 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: <20221216182524.s6a4uihgavji7bti@pali> References: <20221207143351.GA1439513@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221207143351.GA1439513@bhelgaas> User-Agent: NeoMutt/20180716 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 Wednesday 07 December 2022 08:33:51 Bjorn Helgaas wrote: > 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! I'm disappointed that such unimportant change is prioritized and taken before any other important changes which are fixing real issue and waiting for applying about half of year. > > --- > > > > 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