fwnode_led_get(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’‘ 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 and phandle is a literal thing β€” keep those exact, iykyk 🧚

🌈 SEE ALSO 🌈

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