devm_tegra_m...ntroller_get(9)
β¨ 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_PTRon 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
- 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