regmap_read_poll_timeout(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ regmap_read_poll_timeout(9) ✨

okay so welcome to the Kernel API Manual, bestie πŸ’– this page is literally all about regmap_read_poll_timeout β€” the β€œpoll until a condition is met or a timeout occurs” icon of the regmap world. no cap. πŸ¦‹

🌸 NAME 🌸

regmap_read_poll_timeout β€” poll until a condition is met or a timeout occurs. periodt. πŸ’…

πŸŽ€ SYNOPSIS πŸŽ€

regmap_read_poll_timeout (map , addr , val , cond , sleep_us ,
       timeout_us );

πŸ’– ARGUMENTS πŸ’–

  • map β€” the regmap you're reading from. main character regmap energy. πŸ‘‘
  • addr β€” the address to poll. like, we keep checking this spot. πŸ“
  • val β€” an unsigned integer variable to read the value into. the value goes in here, bestie. πŸŽ€
  • cond β€” the break condition (usually involving val). this is the β€œare we done yet?” vibe check. ✨
  • sleep_us β€” maximum time to sleep between reads in us (0 tight-loops). pls read the usleep_range function description for details and limitations. 🫢
  • timeout_us β€” timeout in us; 0 means never timeout. ⏳

🌈 DESCRIPTION 🌈

This is modelled after the readx_poll_timeout macros in linux/iopoll.h. that's the whole description, and honestly? iconic. ✨

πŸ”₯ RETURN πŸ”₯

  • 0 on success. slay. πŸ’–
  • -ETIMEDOUT upon a timeout. 😭
  • or the regmap_read error return value in case of a error read. πŸ’€

In the two former cases, the last read value at addr is stored in val.

⚠️ Must not be called from atomic context if sleep_us or timeout_us are used. fr fr, respect the atomic-context boundary. 🚫

πŸ‘‘ SEE ALSO πŸ‘‘

the whole SEE ALSO list is giving regmap extended universe πŸŒˆπŸ’œ


source/version: ./include/linux Β· date: October 2026 β€” k bye bestie, mwah πŸ’‹πŸ«Άβœ¨

πŸ“¦ where this page comes from