led_set_brightness(9)
β¨ led_set_brightness(9) β¨
okay so you're in the Kernel API Manual, section 9, and the star of this page is led_set_brightness β yes bestie, it does exactly what it says on the tin π
πΈ NAME πΈ
led_set_brightness β set LED brightness. that's it. that's the whole vibe π
π¦ SYNOPSIS π¦
void led_set_brightness (struct led_classdev *led_cdev , unsigned int
brightness );
like, look at her. void return, two args, no notes π₯
π ARGUMENTS π
led_cdevβ the LED to set. the main character of this whole operation πbrightnessβ the brightness to set it to. yeah, that's literally the one-liner the original gives us, and honestly? iconic minimalism π«Ά
β DESCRIPTION β
So what actually happens: this sets an LED's brightness, and β if necessary β it cancels the software blink timer. yep, the one that handles blinking when the hardware can't do it itself. so the software is doing the heavy lifting in the background and this function is like "k, we're done with that now" π
And the big flex: this function is guaranteed not to sleep. no napping, no blocking, she's awake the whole time β¨ (which, if you know why that matters in kernel context, you already know β iykyk π)
π SEE ALSO π
Kernel file ./include/linux/leds.h plus the whole LED friend group, all here, all accounted for:
struct led_lookup_data(9)led_classdev_register_ext(9)led_classdev_register(9)led_blink_set(9)led_blink_set_nosleep(9)led_blink_set_oneshot(9)led_set_brightness_sync(9)led_mc_set_brightness(9)led_update_brightness(9)led_get_default_pattern(9)led_sysfs_disable(9)led_sysfs_enable(9)led_compose_name(9)led_get_color_name(9)led_sysfs_is_disabled(9)struct led_pattern(9)
k bye bestie, go light something up π‘π¦ β this page lives in ./include/linux and it's dated October 2026, so yeah, future-coded of her fr fr π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms