Linux GPIO subsystem development
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Cc: Linus Walleij <linusw@kernel.org>,
	Bartosz Golaszewski <brgl@kernel.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Andy Shevchenko <andy@kernel.org>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gpio: swnode: remove deprecated lookup mechanism
Date: Mon, 29 Jun 2026 16:10:40 +0300	[thread overview]
Message-ID: <akJu0EFRFUjxaq34@ashevche-desk.local> (raw)
In-Reply-To: <20260629-gpio-swnode-drop-label-matching-v1-1-db1af36cf883@oss.qualcomm.com>

On Mon, Jun 29, 2026 at 12:54:58PM +0200, Bartosz Golaszewski wrote:
> GPIO software node lookup should rely exclusively on matching the
> addresses of the referenced firmware nodes. Commit e5d527be7e69 ("gpio:
> swnode: don't use the swnode's name as the key for GPIO lookup") tried to
> enforce this but had to be reverted: it broke existing users who abused
> the software node mechanism by creating "dummy" software nodes named
> after the device they want to get GPIOs from, without ever attaching them
> to the actual GPIO devices. Those users relied on GPIOLIB matching the
> label of the GPIO controller against the name of the software node rather
> than on a real firmware node link.
> 
> All such users have now been coverted to using attached software nodes
> via the fwnode address lookup path and the kernel documentation has been
> updated to recommend it as the correct approach. This allows us to remove
> the old behavior.
> 
> This will allow us to leverage the upcoming support for fw_devlink for
> software nodes in GPIO core.

I am in favour of this,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
(but I prefer cleaner diff, see below).

...

>  fwnode_lookup:
> -	gdev = gpio_device_find_by_fwnode(fwnode);

> -	return gdev ?: ERR_PTR(-EPROBE_DEFER);


Can we simply leave these two instead?

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2026-06-29 13:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-29 10:54 [PATCH] gpio: swnode: remove deprecated lookup mechanism Bartosz Golaszewski
2026-06-29 13:10 ` Andy Shevchenko [this message]
2026-06-29 14:04   ` Bartosz Golaszewski
2026-06-29 14:35     ` Andy Shevchenko
2026-06-29 14:23 ` kernel test robot
2026-07-01  8:17 ` Linus Walleij

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=akJu0EFRFUjxaq34@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=bartosz.golaszewski@oss.qualcomm.com \
    --cc=brgl@kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linusw@kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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