diff options
author | 2024-10-18 11:10:16 +0200 | |
---|---|---|
committer | 2024-10-22 08:59:09 +0200 | |
commit | 07c61d4da43fa3b34c152b28010d20be115a96db (patch) | |
tree | 2427ca5376d5ccc484ebb72836de9019e1af6565 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | gpiolib: switch the line state notifier to atomic (diff) | |
download | wireguard-linux-07c61d4da43fa3b34c152b28010d20be115a96db.tar.xz wireguard-linux-07c61d4da43fa3b34c152b28010d20be115a96db.zip |
gpiolib: notify user-space about in-kernel line state changes
We currently only notify user-space about line config changes that are
made from user-space. Any kernel config changes are not signalled.
Let's improve the situation by emitting the events closer to the source.
To that end let's call the relevant notifier chain from the functions
setting direction, gpiod_set_config(), gpiod_set_consumer_name() and
gpiod_toggle_active_low(). This covers all the options that we can
inform the user-space about. We ignore events which don't have
corresponding flags exported to user-space on purpose - otherwise the
user would see a config-changed event but the associated line-info would
remain unchanged.
gpiod_direction_output/input() can be called from any context.
Fortunately, we now emit line state events using an atomic notifier
chain, so it's no longer an issue.
Let's also add non-notifying wrappers around the direction setters in
order to not emit superfluous reconfigure events when requesting the
lines as the initial config should be part of the request notification.
Use gpio_do_set_config() instead of gpiod_set_debounce() for configuring
debouncing via hardware from the character device code to avoid multiple
reconfigure events.
Reviewed-by: Kent Gibson <warthog618@gmail.com>
Link: https://lore.kernel.org/r/20241018-gpio-notify-in-kernel-events-v5-8-c79135e58a1c@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions