dpll_device_get(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– dpll_device_get(9) πŸ’–

okay so this is a page from the Kernel API Manual (yes, the kernel kernel, we're being serious and adorable at the same time) and today's main character is dpll_device_get β€” the function that finds you an existing dpll device or, if there isn't one yet, just goes ahead and makes you a fresh one. icon behavior, honestly.


✨ NAME ✨

dpll_device_get β€” find an existing dpll device, or create a new one, bestie πŸ’…


🌸 SYNOPSIS 🌸

struct dpll_device * dpll_device_get (u64 clock_id , u32 device_idx ,
       struct module *module , dpll_tracker *tracker );

like… look at that signature. so structured. so valid. πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • clock_id β€” the clock_id of whoever created this thing (the creator's clock id, no cap)
  • device_idx β€” the index handed to you by the device driver, it's literally the driver's own little label
  • module β€” a reference to the module that's registering
  • tracker β€” the tracking object for the reference you just acquired, so nobody loses track of it 🫢

πŸ’œ DESCRIPTION πŸ’œ

okay so the whole vibe: you call this and it gets you the existing object of a dpll device β€” and that object is unique for the arguments you passed in. and if that object doesn't exist yet? it creates a new one. yes ma'am, find-or-create, we love a function that does both 😭


πŸ”₯ CONTEXT πŸ”₯

it acquires a lock β€” specifically dpll_lock. so like, be aware, there's locking going on. don't be weird about it. ⭐


πŸ‘‘ RETURN πŸ‘‘

  • a valid dpll_device struct pointer if it succeeded πŸŽ‰
  • ERR_PTR(X) β€” that's the error case, and it's an error πŸ’€

🌈 SEE ALSO 🌈

like, that's the whole friend group right there. go read them too, iykyk πŸ’–


alright bestie, that's the page! 🧚 it lives over in ./drivers/dpll, and it's dated October 2026 β€” so mark your calendars, this one's from the future (or at least from the version string's dreams). slay, bye! πŸ’…βœ¨πŸ“

πŸ“¦ where this page comes from