fwnode_led_get(9)
π‘ fwnode_led_get(9) β bestie's guide to the Kernel API Manual β¨
okay so like, this one's from the Kernel API Manual, section 9, and it's literally called fwnode_led_get. yes it's a mouthful. no we're not changing it. let's go π
πΈ NAME πΈ
fwnode_led_get β request a LED device via the LED framework π
like, you're asking the LED framework very nicely for a LED device. that's the whole vibe. β¨
π¦ SYNOPSIS π¦
struct led_classdev * fwnode_led_get (struct fwnode_handle *fwnode , int
index , const char *name );
copy that exactly bestie, character for character, don't @ me π
π ARGUMENTS π
fwnodeβ the firmware node you're grabbing the LED device from. that's your starting point, your source of truth, your main character π«Άindexβ the index of the LED. yes, the actual number. which one you want out of the pile π’nameβ the name of the LED, used to map it to its function, if present. if it's not there, well, it's not there π
β DESCRIPTION β
okay so here's the tea: this returns the LED device parsed from the phandle specified in the "leds" property of a device tree node π
and if it fails? it returns a negative error-code. not zero, not vibes, a negative error-code. so like, check your return value, bestie, fr fr π
lowkey important:"leds"is a literal property name andphandleis a literal thing β keep those exact, iykyk π§
π SEE ALSO π
- Kernel file
./drivers/leds/led-class.cπ led_classdev_suspend(9)led_classdev_resume(9)led_put(9)devm_of_led_get(9)led_get(9)devm_led_get(9)led_add_lookup(9)led_remove_lookup(9)devm_of_led_get_optional(9)led_classdev_register_ext(9)led_classdev_unregister(9)devm_led_classdev_register_ext(9)devm_led_classdev_unregister(9)
like, that's the whole friend group right there, go say hi π
aaaand that's the page!! sourced from ./drivers/leds, dated October 2026, and it's fwnode_led_get(9) all day every day β¨ slay, go get your LED π¦π
π
π¦ 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