From: Bartosz Golaszewski Date: Thu, 31 Oct 2024 20:01:54 +0000 (+0100) Subject: gpio: sysfs: emit chardev line-state events on active-low changes X-Git-Tag: v6.13-rc1~156^2~23 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=5a7119e0d951fdf7ebcc25a77565ac184798639a;p=linux-block.git gpio: sysfs: emit chardev line-state events on active-low changes The sysfs active_low attribute doesn't go through the usual paths so it doesn't emit the line-state event. Add the missing call to gpiod_line_state_notify() to gpio_sysfs_set_active_low(). Reviewed-by: Kent Gibson Link: https://lore.kernel.org/r/20241031-gpio-notify-sysfs-v4-4-142021c2195c@linaro.org Signed-off-by: Bartosz Golaszewski --- diff --git a/drivers/gpio/gpiolib-sysfs.c b/drivers/gpio/gpiolib-sysfs.c index 329ebba3d6d4..73b1f235cf72 100644 --- a/drivers/gpio/gpiolib-sysfs.c +++ b/drivers/gpio/gpiolib-sysfs.c @@ -307,6 +307,8 @@ static int gpio_sysfs_set_active_low(struct device *dev, int value) status = gpio_sysfs_request_irq(dev, flags); } + gpiod_line_state_notify(desc, GPIO_V2_LINE_CHANGED_CONFIG); + return status; }