Linux GPIO subsystem development
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy@kernel.org>
To: Dipen Patel <dipenp@nvidia.com>
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
Date: Tue, 10 Oct 2023 16:13:19 +0300	[thread overview]
Message-ID: <ZSVN73ffDkGBzmmI@smile.fi.intel.com> (raw)
In-Reply-To: <20231009173858.723686-1-dipenp@nvidia.com>

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 <andy@kernel.org>

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2023-10-10 13:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-09 17:38 [PATCH 1/1] gpio: tegra186: Set fwnode of the GPIO chip Dipen Patel
2023-10-10 13:13 ` Andy Shevchenko [this message]
2023-10-10 13:48   ` Andy Shevchenko
2023-10-10 14:13     ` Andy Shevchenko
2023-10-10 14:25       ` Andy Shevchenko
2023-10-10 15:10         ` Bartosz Golaszewski
2023-10-10 15:18           ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZSVN73ffDkGBzmmI@smile.fi.intel.com \
    --to=andy@kernel.org \
    --cc=brgl@bgdev.pl \
    --cc=dipenp@nvidia.com \
    --cc=jonathanh@nvidia.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox