diff options
author | Dmitry Rokosov <ddrokosov@salutedevices.com> | 2024-09-04 01:39:30 +0300 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2024-11-06 08:11:19 +0000 |
commit | 32360bf6a5d4016669c3545e7b0ec939937f5331 (patch) | |
tree | 4c98d0520190b9ca0ac53a0d602b05b571b957ed /drivers/leds/trigger | |
parent | 64dd44a658065ab5595bbfe2cb4d8fd30c9e34a2 (diff) |
leds: Introduce ordered workqueue for LEDs events instead of system_wq
This allows to setup ordered workqueue for LEDs events. This may be
useful, because default 'system_wq' does not guarantee execution order
of each work_struct, thus for several brightness update requests (for
multiple LEDs), real brightness switch could be in random order.
Yes, for sysfs-based LEDs we have flush_work() call inside
brightness_store() operation, but it's blocking call, so userspace
caller can be blocked at a long time, which means LEDs animation stream
can be broken.
Ordered workqueue has the same behaviour as system_wq + flush_work(),
but all scheduled works are async and userspace caller is not blocked,
which it better for userspace animation scheduling.
Signed-off-by: Alexey Romanov <avromanov@salutedevices.com>
Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
Link: https://lore.kernel.org/r/20240903223936.21292-1-ddrokosov@salutedevices.com
[Lee: Couple of style fix-ups]
Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/leds/trigger')
0 files changed, 0 insertions, 0 deletions