Re: [PATCH] gpiolib: of: don't mark hog nodes OF_POPULATED before a chip is found

From: Bartosz Golaszewski

Date: Tue Sep 01 2026 - 12:27:56 EST



On Sat, 15 Aug 2026 13:44:19 -0700, Abdurrahman Hussain wrote:
> When a gpio-hog node is attached by a device-tree overlay before its
> parent GPIO chip has been registered, of_gpio_notify() sets
> OF_POPULATED on the node via of_node_test_and_set_flag() and only then
> discovers that there is no gpio_device for the parent, returning
> NOTIFY_DONE without clearing the flag.
>
> Since gpiochip_hog_lines() skips any hog child whose of_node carries
> OF_POPULATED, the leaked flag makes the hog silently ignored when the
> chip is registered later. Applying an overlay containing both a GPIO
> controller node and its hog children - and populating devices only
> after the overlay apply completes - hits this on every boot; the hog
> is only applied if the chip driver is unbound (which clears the flag
> in the remove path) and rebound.
>
> [...]

Applied, thanks!

[1/1] gpiolib: of: don't mark hog nodes OF_POPULATED before a chip is found
https://git.kernel.org/brgl/c/1f1d0812f6a8ab8e6f709c599f137c99646512cc

Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>