led_set_brightness_sync(9)
π‘ led_set_brightness_sync(9) π‘
okay bestie, welcome to the Kernel API Manual β yes this is a real actual kernel man page and yes it's about making an LED go bright, we love a glow-up era β¨
πΈ NAME πΈ
led_set_brightness_sync β set LED brightness synchronously π«Ά
like, you say "be bright now" and it is bright now, no vibes-based waiting around π
β¨ SYNOPSIS β¨
int led_set_brightness_sync (struct led_classdev *led_cdev , unsigned
int value );
the way that this is literally just two args and a dream π
π ARGUMENTS π
led_cdevβ the LED to set π this is the little guy you're about to make iconicvalueβ the brightness to set it to β like, the actual number, the whole point
π¦ DESCRIPTION π¦
Set an LED's brightness immediately. no queue, no "we'll get to it", no situationship β immediately, fr fr π₯
This function will block the caller for the time required for accessing device registers, and it can sleep. so like... it's committed, it's gonna sit there and wait, and heads up it's allowed to nap π΄ lowkey important if you're calling it from a context that isn't cool with sleeping π
π RETURN π
0 on success π or a negative error value on failure π
not me getting a negative number back, that's giving "something went wrong bestie" π
π SEE ALSO π
Kernel file ./include/linux/leds.h β and the whole LED friend group, they all show up together iykyk:
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(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)
and that's the whole page, no cap π§π this came out of ./include/linux and it's dated October 2026 β so go forth, set those brightnesses synchronously, and slay π
πΈπ
π¦ 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