Skip to content

Commit 5a7119e

Browse files
author
Bartosz Golaszewski
committed
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent 285678c commit 5a7119e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/gpio/gpiolib-sysfs.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,8 @@ static int gpio_sysfs_set_active_low(struct device *dev, int value)
307307
status = gpio_sysfs_request_irq(dev, flags);
308308
}
309309

310+
gpiod_line_state_notify(desc, GPIO_V2_LINE_CHANGED_CONFIG);
311+
310312
return status;
311313
}
312314

0 commit comments

Comments
 (0)