summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>2024-10-31 21:01:54 +0100
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>2024-11-04 08:56:19 +0100
commit5a7119e0d951fdf7ebcc25a77565ac184798639a (patch)
tree4afa9cd4b60007d86f191b92d9db680aa3904a5b
parentgpio: sysfs: emit chardev line-state events on GPIO export (diff)
downloadlinux-5a7119e0d951fdf7ebcc25a77565ac184798639a.tar.xz
linux-5a7119e0d951fdf7ebcc25a77565ac184798639a.zip
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 <warthog618@gmail.com> Link: https://lore.kernel.org/r/20241031-gpio-notify-sysfs-v4-4-142021c2195c@linaro.org Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-rw-r--r--drivers/gpio/gpiolib-sysfs.c2
1 files changed, 2 insertions, 0 deletions
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;
}