cdns_find_pdi(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« cdns_find_pdi β€” bestie's guide to finding a free PDI πŸ’«

okay so this is a page from the Kernel API Manual, and honestly? it's short, it's sweet, and it's giving "tiny function, big responsibilities." let's get into it 🫢


🌸 NAME 🌸

cdns_find_pdi β€” Find a free PDI ✨

like, that's literally the whole job. it finds you a free PDI. iconic behavior.


πŸ¦‹ SYNOPSIS πŸ¦‹

struct sdw_cdns_pdi * cdns_find_pdi (struct sdw_cdns *cdns , unsigned
int num , struct sdw_cdns_pdi *pdi , int dai_id );

she takes four arguments and returns a pointer to a struct sdw_cdns_pdi β€” and yes, she can absolutely hand you NULL back, we'll get to that πŸ‘€


πŸŽ€ ARGUMENTS πŸŽ€

  • cdns β€” the Cadence instance πŸ’œ like, the whole vibe you're working inside
  • num β€” Number of PDIs πŸ”’
  • pdi β€” the PDI instances themselves 🧚 your little array of candidates
  • dai_id β€” DAI id 🎫 the identifier you're matching against

⭐ DESCRIPTION ⭐

so here's the tea β˜• β€” cdns_find_pdi finds a PDI for a given PDI array. that's the whole mission.

but here's the important bit, and i need you to hear me on this one: the PDI num and dai_id are expected to match. if they don't match? it returns NULL. no PDI for you, bestie. πŸ’€

lowkey a vibe check for your arguments β€” mismatch and you get nothing back. keep num and dai_id in agreement or don't come crying to me 😭

πŸ‘‘ SEE ALSO πŸ‘‘

the kernel file lives right here, no cap:

./drivers/soundwire/cadence_master.c

and here's the whole friend group, every single one of them, not skipping a single bestie πŸ’…


and that's the whole page, bestie!! πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈ

this lil masterpiece comes from ./drivers/soundwire and it's dated October 2026 β€” so yeah, mark your calendars, she's timeless fr fr πŸ«ΆπŸ‘‘

πŸ“¦ where this page comes from