From: Bartosz Golaszewski Date: Fri, 18 Oct 2024 09:10:09 +0000 (+0200) Subject: gpiolib: notify user-space when a driver requests its own desc X-Git-Tag: v6.13-rc1~156^2~52 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=49182c87af377ec4ae0a5e116a9059e03b083574;p=thirdparty%2Fkernel%2Flinux.git gpiolib: notify user-space when a driver requests its own desc We notify user-space about lines being requested from user-space or by drivers calling gpiod_get() but not when drivers request their own lines so add the missing call to gpiod_line_state_notify(). Reviewed-by: Kent Gibson Link: https://lore.kernel.org/r/20241018-gpio-notify-in-kernel-events-v5-1-c79135e58a1c@linaro.org Signed-off-by: Bartosz Golaszewski --- diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 97346b746ef5e..c09464f70f731 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -2532,6 +2532,8 @@ struct gpio_desc *gpiochip_request_own_desc(struct gpio_chip *gc, return ERR_PTR(ret); } + gpiod_line_state_notify(desc, GPIO_V2_LINE_CHANGED_REQUESTED); + return desc; } EXPORT_SYMBOL_GPL(gpiochip_request_own_desc);