of_device_is_available(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… of_device_is_available β€” like, the whole vibe check for a device node

okay so bestie, welcome to of_device_is_available(9) β€” that's the device-tree section of the Kernel API Manual, and yes it's exactly as iconic as it sounds ✨


🌸 NAME 🌸

of_device_is_available β€” the "are you actually coming to the party or not" check for a device πŸŽ€


✨ SYNOPSIS ✨

bool of_device_is_available (const struct device_node *device );

it returns a bool, it takes exactly one pointer, and it's giving "small function, big main character energy" πŸ’…


🫢 ARGUMENTS 🫢

  • device β€” the struct device_node * you're side-eyeing πŸ‘€ like, this is the node we're checking for availability. no node, no answer, iykyk.

πŸ”₯ RETURN πŸ”₯

it hands back true when the status property is absent entirely or when it's literally set to "okay" or "ok" β€” those two spellings both slay πŸ’–

and false otherwise. no cap. anything else is a no from her πŸ™ˆ


πŸ¦‹ SEE ALSO πŸ¦‹

the kernel source lives at ./drivers/of/base.c β€” go read it, it's right there πŸ‘‘

and honestly the whole friend group showed up for this one, so let's give them their moment 🌈:

like, that's the entire group chat, everyone's invited 🫢


lowkey a reminder: if the status property is there but it's not "okay" or "ok", this function says false. that's the whole rule, don't overthink it bestie 🧚

and that's the page!! brought to you by the ./drivers/of crew, dated October 2026 πŸ’œ written by the kernel API manual girlies, obviously. mwah πŸ’‹β­

πŸ“¦ where this page comes from