spmi_find_device_by_of_node(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… spmi_find_device_by_of_node β€” the kernel API manual, but make it make sense

okay so bestie, welcome to the spmi_find_device_by_of_node(9) page 🫢 this is kernel API manual territory, and honestly? it's a short one. we love a low-effort icon. ✨


🌸 NAME 🌸

spmi_find_device_by_of_node β€” literally just "look up an SPMI device from a device node". that's the whole vibe check. πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

struct spmi_device * spmi_find_device_by_of_node (struct device_node *np
);

yes the line break is really just like that in the original. we don't fix it. we respect it. 😌


πŸ¦‹ ARGUMENTS πŸ¦‹

  • np β€” the device node. that's it, that's the argument. a struct device_node * and nothing else. she's low maintenance, we stan. πŸ‘‘

✨ DESCRIPTION ✨

okay so here's the tea, and this part is important, so pay attention bestie:

it takes a reference to the embedded struct device which needs to be dropped after use.

no cap. you grab it, you gotta let it go. holding onto that reference forever is giving red flag energy and the kernel will absolutely notice. 😭

and what do you get back? it returns the struct spmi_device associated with a device node β€” or NULL. that's the whole deal. either you get your device or you get nothing, and honestly? relatable. πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘

the kernel file ./drivers/spmi/spmi.c is where all the friends live, and here's the full group chat, no one left on read:

like, seventeen whole friends. she's connected. πŸ’…


🌈 the sign-off 🌈

this whole thing lives in ./drivers/spmi (that's the source, mwah), it's dated October 2026, and the version is, you guessed it, spmi_find_device_by_of_node(9). go forth, look up your devices, and drop that reference β€” i'm serious, bestie. πŸŽ€πŸ§šπŸ’œ

πŸ“¦ where this page comes from