led_set_brightness_sync(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’‘ 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 iconic
  • value β€” 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:


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