sdca_asoc_pd...ll_actual_ps(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… sdca_asoc_pde_poll_actual_ps β€” bestie's guide to "did the power state actually get there yet??"

okay so real talk, this is straight out of the Kernel API Manual (yes, the (9) one, we're in kernel-land now, put your seatbelt on πŸŽ€). The star of the show is sdca_asoc_pde_poll_actual_ps, and the way that name is giving "I have a lot of lowercase letters and I'm not sorry". Sit down, hydrate, let's go 🫢


✨ NAME ✨

sdca_asoc_pde_poll_actual_ps β€” verify that the PDE power state reached the target state. literally its whole job. no cap πŸ‘‘


🌸 SYNOPSIS 🌸

int sdca_asoc_pde_poll_actual_ps (struct regmap *regmap , int
function_id , int entity_id , int from_ps , int to_ps , const struct
sdca_pde_delay *pde_delays , int num_delays );

like yes, that's a lot of arguments. we count them. we respect them. πŸ’€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • regmap β€” the register map you use for reading the ACTUAL_PS register. it's literally the connection to the hardware, don't lose it πŸ™ˆ
  • function_id β€” the SDCA function identifier. which function we're talking to, bestie.
  • entity_id β€” the SDCA entity identifier for the power domain. this is the specific one we care about ✨
  • from_ps β€” the source power state, a SDCA_PDE_PSn value. where we're coming from πŸ’«
  • to_ps β€” the target power state, also a SDCA_PDE_PSn value. where we're going, main character destination energy πŸ”₯
  • pde_delays β€” pointer to an array of PDE delay specifications for this device, or NULL to use the default polling interval. your call, both are valid 🌈
  • num_delays β€” number of entries in the pde_delays array. gotta know how many we got πŸ“

πŸ’œ DESCRIPTION πŸ’œ

so here's the vibe: this function polls the ACTUAL_PS register to verify that a PDE power state transition has actually completed. per the SDCA specification, after writing REQUESTED_PS, the caller must poll ACTUAL_PS until it reflects the requested state. that's the rule, we don't make the rules, we just poll by them 😌

big important thing, highlight it in your notes: this function implements the polling logic but does NOT modify the power state. not even a little. the caller is responsible for writing REQUESTED_PS before invoking this function. so if you skip that step, that's on you, not on us πŸ’…

and if a delay table is provided, the appropriate polling intervals get extracted based on the from_ps and to_ps transition β€” cute, right? and if no table is provided or no matching entry is found, a default polling interval is used instead. everybody's covered 🧚


⭐ RETURN ⭐

  • Returns zero when ACTUAL_PS reaches the target state. slay, we love a success πŸ’–
  • Returns -ETIMEDOUT if the polling times out before reaching the target state. it tried, it waited, it gave up 😭
  • Returns a negative error code if a register read fails. hardware said no πŸ™ƒ

πŸ”₯ SEE ALSO πŸ”₯

kernel file ./sound/soc/sdca/sdca_asoc.c plus the whole friend group:

go read them. iykyk πŸ“š


okay that's the whole page, you ate that πŸ’…βœ¨ this one lives in ./sound/soc/sdca, dated October 2026, and it's the sdca_asoc_pd...ll_actual_ps(9) girlie from the Kernel API Manual β€” go forth and poll responsibly, bestie πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from