devm_tegra_m...ntroller_get(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ devm_tegra_m...ntroller_get(9) ✨

okay so real talk, this is a page straight out of the Kernel API Manual and it's honestly kind of a little gem πŸ’Ž like it's short, it's sweet, it does exactly one thing and it does it well. main character energy fr. let's get into it 🫢


🌸 NAME 🌸

devm_tegra_memory_controller_get β€” get the Tegra Memory Controller handle, bestie. that's the whole gig πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

struct tegra_mc * devm_tegra_memory_controller_get (struct device *dev );

like yes that's the entire signature, no cap. one function, one argument, one very specific job ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the device pointer for the consumer device πŸ’– this is the device that's like "hey bestie can I get a memory controller please" and honestly same

πŸ’œ DESCRIPTION πŸ’œ

okay so here's the vibe 🌈 this function goes and searches for the Memory Controller node in a device-tree, and then it retrieves the Memory Controller handle for you. that's it. that's the function. it's out here doing the find-and-fetch so you don't have to 😭 iconic behaviour honestly

no complicated options, no weird flags, just tree-walking and handle-getting. the way that it's literally just a lookup and yet it's still doing the most for your driver 🧚


πŸ”₯ RETURN πŸ”₯

  • ERR_PTR on error 😭 (so like, check it, please, don't just rawdog it into a dereference, that's giving undefined behaviour and we don't do that here)
  • or a valid pointer to a struct tegra_mc πŸ‘‘ which is the slay outcome, the one you want, the one where everything works out πŸ’–
ngl the classic pattern applies: if it's an error pointer, handle it. this page is telling you the two possible outcomes and it is not being subtle about it. check your pointers bestie 🫢

πŸ“ SEE ALSO πŸ“

  • Kernel file ./drivers/memory/tegra/mc.c β€” the source, the origin, the mothership 🌸 go read it, iykyk

and that's the whole page diva πŸ’… nothing else to see, it's a one-trick pony and the trick is good. the source lives down in ./drivers/memory/tegra, dated October 2026, and it's all wrapped up under the devm_tegra_m...ntroller_get(9) title in the Kernel API Manual πŸŽ€ periodt, go get your memory controller handle bestie πŸ’–βœ¨

πŸ“¦ where this page comes from