diff options
| author | Thomas Zimmermann <tzimmermann@suse.de> | 2025-03-21 12:54:03 +0300 |
|---|---|---|
| committer | Lee Jones <lee@kernel.org> | 2025-04-10 12:39:13 +0300 |
| commit | dc2139c0aa3283e5749109641af1878ed7bf7371 (patch) | |
| tree | aaa0aefc0bb2bee94c34bde0ba187cef1e6c3da2 /include | |
| parent | 28f8bab711c0984005a6dd4cc980b4ba8409b817 (diff) | |
| download | linux-dc2139c0aa3283e5749109641af1878ed7bf7371.tar.xz | |
leds: backlight trigger: Replace fb events with a dedicated function call
Remove support for fb events from the led backlight trigger. Provide
the helper ledtrig_backlight_blank() instead. Call it from fbdev to
inform the trigger of changes to a display's blank state.
Fbdev maintains a list of all installed notifiers. Instead of the fbdev
notifiers, maintain an internal list of led backlight triggers.
v3:
- export ledtrig_backlight_blank()
v2:
- maintain global list of led backlight triggers (Lee)
- avoid IS_REACHABLE() in source file (Lee)
- notify on changes to blank state instead of display state
- use lock guards
- initialize led list and list mutex
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Simona Vetter <simona.vetter@ffwll.ch>
Link: https://lore.kernel.org/r/20250321095517.313713-11-tzimmermann@suse.de
Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/leds.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/leds.h b/include/linux/leds.h index 98f9719c924c..b3f0aa081064 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h @@ -640,6 +640,12 @@ static inline void ledtrig_flash_ctrl(bool on) {} static inline void ledtrig_torch_ctrl(bool on) {} #endif +#if IS_REACHABLE(CONFIG_LEDS_TRIGGER_BACKLIGHT) +void ledtrig_backlight_blank(bool blank); +#else +static inline void ledtrig_backlight_blank(bool blank) {} +#endif + /* * Generic LED platform data for describing LED names and default triggers. */ |
