Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp2752938rwb; Mon, 5 Sep 2022 00:23:54 -0700 (PDT) X-Google-Smtp-Source: AA6agR4StfSf+VncMdJjDHNJ0XZp1LiTT08UAXCwYPSpLQ1UCQK82EpX6pGJScZZDRmlgph6C/wv X-Received: by 2002:a17:90b:1bca:b0:1fb:7eaf:8955 with SMTP id oa10-20020a17090b1bca00b001fb7eaf8955mr18524963pjb.37.1662362634638; Mon, 05 Sep 2022 00:23:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662362634; cv=none; d=google.com; s=arc-20160816; b=m74fUxmEsp/jMWmpvkhGJnxJDNMM1I/k5F2Zy3Tx6LgJ7aznwFzPi/M1RPHoK9CVt8 fgZxzQ4cpLSqzhdox1tW8lvyTIFhot2D54UA40Zdl0Njy5rU83vU9eFoA+XdzQGa7IeR lOT9ZXQKh8UXFbenPkvJb3ayZyFRz20YvlfGzkihj0v5dsyFuWRqNYK4wcdCFfVFogmT g+q7JNnV8f5AHX7S6xG0pfo44JjsLMNUArCKNLhov37v7nI9o+pMbDrnOsdZHA/HEpce CjX0jkP6gm0CKBIhUpTAB420Aa0DNokdHWSUseVLIiQKzr0vKlPVDLSnyqgpz/gORwzx Kx7Q== 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-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=e8LmF9pu4iHLc0ivOY+tmCxFFmuojCFBaFKF/bblSo0=; b=qXlmdEZX+t+7YOizqJVNcW1SZldSk99c469SARiku8AknQoG/h5rtS49Kb2GSxHU6n /5aTxaeSUtcFUchiSKEGaX0MPwVOmj3aIuYfebjOew/hJGwBgV5wfQbllHfYxJhXFWaf +SOgiZMN4GFkRSUVYZaysBO5DI3MFx6S6zybTMLYrgsBQU1QS5nbe9n06kkNHAxDDFwT mKuj0IJh/Oe1uG3afblbzVXr8kNFBxZlfmUjLgd1lVjwdYbVkvmEf7MK4wXJmCMg6Vce d8JRp5a7l8cqbYkpZI+f7vZrIeigw4OBD+T783d/xH5Q8uqbC4kr1fUnq9BctBtW+rMa nnjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=A5IVl+JO; 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 k3-20020a170902c40300b001754bb3be35si6804449plk.555.2022.09.05.00.23.43; Mon, 05 Sep 2022 00:23:54 -0700 (PDT) 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=A5IVl+JO; 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 S237129AbiIEHW6 (ORCPT + 99 others); Mon, 5 Sep 2022 03:22:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236417AbiIEHW2 (ORCPT ); Mon, 5 Sep 2022 03:22:28 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 084B247B84; Mon, 5 Sep 2022 00:19:06 -0700 (PDT) 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 85BE561133; Mon, 5 Sep 2022 07:19:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0A82C433C1; Mon, 5 Sep 2022 07:19:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662362344; bh=19nxD2OgHF2QVoth2PFq3CxZH5zVFIqpZyEzuI/YHbw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=A5IVl+JOjFxfodqmnjA5/iplAcU9jdP05wWuvEqZCUxiPZuyoNor7xgxpbYXB6NVK 7DcajL5+Q4Jwv4XR1AvPOAXkUgrwSH/Ov7HM3KXUEl/b4BKQG5MdZ5GTO8igdjjVEV HR2BrWQ7cSeUZcnhf0SNpLKhbJC0AEjYvFObLKGjaI4ohnPRXMXtOd+2eSUbXERAnn Wt+aJ6+72CZQwxjMiKfr0QzSL2qh96wXclEVsX5h4ma+908Zyb6OVtZsD0AEGTokvq Z4gsx2A9lpZW+2kJWomwEZtX41BXuoB9ZUs+w+vRDjrWEAYqK9IYV1wftZ4A4k/PEn RnEC8ylDHE6IA== Received: by pali.im (Postfix) id 32DB27D7; Mon, 5 Sep 2022 09:19:02 +0200 (CEST) Date: Mon, 5 Sep 2022 09:19:02 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Dmitry Torokhov Cc: Thierry Reding , Mark Brown , Matti Vaittinen , Lorenzo Pieralisi , Claudiu Beznea , Liam Girdwood , Wim Van Sebroeck , Greg Kroah-Hartman , Guenter Roeck , Miquel Raynal , Linus Walleij , Felipe Balbi , Alexandre Belloni , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Vignesh Raghavendra , Daniel Vetter , Thomas Petazzoni , Alexandre Torgue , Marc Zyngier , Richard Weinberger , David Airlie , Nicolas Ferre , Alyssa Rosenzweig , Bartosz Golaszewski , Jonathan Hunter , Rob Herring , Maxime Coquelin , Bjorn Helgaas , linux-watchdog@vger.kernel.org, linux-usb@vger.kernel.org, linux-gpio@vger.kernel.org, linux-pci@vger.kernel.org, linux-tegra@vger.kernel.org, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v1 01/11] PCI: tegra: switch to using devm_fwnode_gpiod_get Message-ID: <20220905071902.fv4uozrsttk3mosu@pali> References: <20220903-gpiod_get_from_of_node-remove-v1-0-b29adfb27a6c@gmail.com> <20220903-gpiod_get_from_of_node-remove-v1-1-b29adfb27a6c@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220903-gpiod_get_from_of_node-remove-v1-1-b29adfb27a6c@gmail.com> 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,T_SCC_BODY_TEXT_LINE 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 Sunday 04 September 2022 23:30:53 Dmitry Torokhov wrote: > I would like to limit (or maybe even remove) use of > [devm_]gpiod_get_from_of_node in drivers so that gpiolib can be cleaned > a bit, so let's switch to the generic device property API. It may even > help with handling secondary fwnodes when gpiolib is taught to handle > gpios described by swnodes. > > Signed-off-by: Dmitry Torokhov > > diff --git a/drivers/pci/controller/pci-tegra.c b/drivers/pci/controller/pci-tegra.c > index 8e323e93be91..929f9363e94b 100644 > --- a/drivers/pci/controller/pci-tegra.c > +++ b/drivers/pci/controller/pci-tegra.c > @@ -2202,10 +2202,11 @@ static int tegra_pcie_parse_dt(struct tegra_pcie *pcie) > * and in this case fall back to using AFI per port register > * to toggle PERST# SFIO line. > */ > - rp->reset_gpio = devm_gpiod_get_from_of_node(dev, port, > - "reset-gpios", 0, > - GPIOD_OUT_LOW, > - label); > + rp->reset_gpio = devm_fwnode_gpiod_get(dev, > + of_fwnode_handle(port), > + "reset", > + GPIOD_OUT_LOW, > + label); Why in pci-aardvark.c for PERST# reset-gpio you have used devm_gpiod_get_optional() and here in pci-tegra.c you have used devm_fwnode_gpiod_get()? I think that PERST# logic is same in both drivers. > if (IS_ERR(rp->reset_gpio)) { > if (PTR_ERR(rp->reset_gpio) == -ENOENT) { > rp->reset_gpio = NULL; > > -- > b4 0.10.0-dev-fc921