linux/drivers/leds/trigger
Martin Kurbanov aa172ba739 leds: trigger: pattern: Add support for hrtimer
Currently, led pattern trigger uses timer_list to schedule brightness
changing. As we know from timer_list API [1], it's not accurate to
milliseconds and depends on HZ granularity.

Example:
"0 10 0 0 50 10 50 0 100 10 100 0 150 10 150 0 200 10 200 0 250 10 250 0",
we expect it to be 60ms long, but it can actually be up to ~120ms
(add ~10ms for each pattern when HZ == 100).

But sometimes, userspace needs time accurate led patterns to make sure
that pattern will be executed during expected time slot.
To achieve this goal the patch introduces optional hrtimer usage for
led trigger pattern, because hrtimer is microseconds accurate timer.

[1]: kernel/time/timer.c#L104

Signed-off-by: Martin Kurbanov <mmkurbanov@salutedevices.com>
Link: https://lore.kernel.org/r/20240416201847.357099-1-mmkurbanov@salutedevices.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-05-02 17:32:01 +01:00
..
Kconfig ALSA: control-led: Integrate mute led trigger 2024-03-28 10:39:50 +00:00
ledtrig-activity.c treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
ledtrig-backlight.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
ledtrig-camera.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
ledtrig-cpu.c leds: trigger: ledtrig-cpu:: Fix 'output may be truncated' issue for 'cpu' 2023-11-01 11:28:51 +00:00
ledtrig-default-on.c leds: triggers: default-on: Add module alias for module auto-loading 2024-03-07 08:48:00 +00:00
ledtrig-disk.c leds: Change led_trigger_blink[_oneshot]() delay parameters to pass-by-value 2023-05-25 12:16:27 +01:00
ledtrig-gpio.c leds: trigger: gpio: Convert to DEVICE_ATTR_RW() 2023-12-13 11:28:39 +00:00
ledtrig-heartbeat.c treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
ledtrig-mtd.c leds: Change led_trigger_blink[_oneshot]() delay parameters to pass-by-value 2023-05-25 12:16:27 +01:00
ledtrig-netdev.c leds: trigger: netdev: Remove not needed call to led_set_brightness in deactivate 2024-04-12 09:47:14 +01:00
ledtrig-oneshot.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
ledtrig-panic.c leds: trigger: panic: Simplify led_trigger_set_panic 2024-03-07 08:48:01 +00:00
ledtrig-pattern.c leds: trigger: pattern: Add support for hrtimer 2024-05-02 17:32:01 +01:00
ledtrig-timer.c leds: trigger: remove redundant assignment to variable ret 2020-04-27 14:13:12 +02:00
ledtrig-transient.c treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
ledtrig-tty.c leds: ledtrig-tty: Add additional line state evaluation 2023-12-13 11:28:51 +00:00
Makefile ALSA: control-led: Integrate mute led trigger 2024-03-28 10:39:50 +00:00