Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp126757rdg; Tue, 10 Oct 2023 06:13:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHV1qPzC1ECtUVzuFWo7XswHfkDlpKsQICtxQDgfuB1cD5FI5aynjzHuEbp6ciupRNoUuVN X-Received: by 2002:a17:902:ec91:b0:1c8:9d32:3392 with SMTP id x17-20020a170902ec9100b001c89d323392mr10168131plg.63.1696943626230; Tue, 10 Oct 2023 06:13:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696943626; cv=none; d=google.com; s=arc-20160816; b=gBevQcGWw/cZNalsDBvObFS78Mo05kVpc0Qxqa3No1NUie4oitKAgbScPDcVy5mZYB 0aHC+EXGwkZ+swwxGtnZuBpGj4nr8Lc2iNfPdgKguDSLCONVHUN5mAS0SNteHXtpXvuT qfY1YhkDPVKniZRZhBjb7CXQEPSFZXtWf/oaOpaXLgHyxCs5L/6WGu1xZBmWP1BYFJsj XagJFKtKICqO15MKj3L2cD3MyDEDjcKTO9SGQG2YUteePsZd31Gezk/01wm25dOSOZe+ U2Il/xJyZzHsBNpynadqnYa/neTETdVbbTuNC41fcNedUS3kHRSjvRe2puI+YixL4s01 w5aA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=2x81ii8L6dehGZSsYtwgvLTPM23laRkGkRVNtOfg6hA=; fh=vj6uynCxX1PIjx28RkHRDil9ntV7XPNFYulihnoZdUg=; b=nsCA8zhx3SBISLZt1VODE5sYOLKJ0JfQvjW6xptRc58ifM7tijOPLVFF/BiIIynFN2 mT7dDzrXouakNhBNoH5ui0Y62Cl2O99wzSunTzprtW7jAQKMcuABpM9sEaELwJ0eTB95 vLBznLp8dtwBZ6FzRebgJqWKe/GR2JXcijp91HyRXanYp6TPAxy9r4UK3FJJOOEebWbw +8D82jC5u7DggakTHyvhUyqqF4dP56MUNK/Ki2Tn0plRTNZrodjoQe96htegTmUq4s8B QD1AScjNoNuNpFxkDUTV5pGbWZZ4Zqv1l/BsidJzJ/COq8Ua7egma/Y5HLx3a1gmzAf5 Rlsg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id u9-20020a17090341c900b001c5ecff1bd4si12699610ple.603.2023.10.10.06.13.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 06:13:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 009CD83762F5; Tue, 10 Oct 2023 06:13:44 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231788AbjJJNN2 (ORCPT + 99 others); Tue, 10 Oct 2023 09:13:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231400AbjJJNN0 (ORCPT ); Tue, 10 Oct 2023 09:13:26 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35530A9; Tue, 10 Oct 2023 06:13:25 -0700 (PDT) X-IronPort-AV: E=McAfee;i="6600,9927,10859"; a="383264952" X-IronPort-AV: E=Sophos;i="6.03,212,1694761200"; d="scan'208";a="383264952" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Oct 2023 06:13:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10859"; a="844124118" X-IronPort-AV: E=Sophos;i="6.03,212,1694761200"; d="scan'208";a="844124118" Received: from smile.fi.intel.com ([10.237.72.54]) by FMSMGA003.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Oct 2023 06:13:22 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.97-RC1) (envelope-from ) id 1qqCY3-00000004LcC-2JKZ; Tue, 10 Oct 2023 16:13:19 +0300 Date: Tue, 10 Oct 2023 16:13:19 +0300 From: Andy Shevchenko To: Dipen Patel Cc: linus.walleij@linaro.org, brgl@bgdev.pl, thierry.reding@gmail.com, jonathanh@nvidia.com, linux-gpio@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] gpio: tegra186: Set fwnode of the GPIO chip Message-ID: References: <20231009173858.723686-1-dipenp@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231009173858.723686-1-dipenp@nvidia.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=2.6 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 10 Oct 2023 06:13:44 -0700 (PDT) X-Spam-Level: ** On Mon, Oct 09, 2023 at 10:38:58AM -0700, Dipen Patel wrote: Tbank you! My comments below. > Any driver that depends on the GPIO match function to locate the GPIO > controller, it has to use the fwnode from the gpio_chip structure. But > with [1], it is GPIO providers job to set any members of the gpio_chip > structure. This patch addresses that. > [1] https://git.kernel.org/pub/scm/linux/kernel/git/pateldipen1984/linux.git/patch/drivers/gpio/gpiolib.c?id=daecca4b8433d47f0db4933bcc0f283d530ba22e Use Link: tag for this? ... > + /* > + * This is needed for driver using gpio device matching where it > + * has to use gpio_chip fwnode to match the gpio controller. > + */ > + gpio->gpio.fwnode = of_node_to_fwnode(pdev->dev.of_node); of_node_to_fwnode() is specific to IRQ, in other places we use generic of_fwnode_handle(). That's why better just to use dev_fwnode(). ... With the above addressed: Reviewed-by: Andy Shevchenko -- With Best Regards, Andy Shevchenko