regmap_field...poll_timeout(9)
π regmap_field_read_poll_timeout β Kernel API Manual β¨
okay so bestie, this is a kernel API page, and the function we're obsessing over is literally regmap_field_read_poll_timeout. Yeah that's a mouthful, she ate though. π
β¨ NAME β¨
regmap_field_read_poll_timeout β poll until a condition is met or timeout. that's it, that's the vibe check π¦
πΈ SYNOPSIS πΈ
regmap_field_read_poll_timeout (field , val , cond , sleep_us , timeout_us );
π ARGUMENTS π
fieldβ the regmap field you're reading from. your main character. πvalβ an unsigned integer variable, and the value gets read into it. she's the destination, no cap.condβ the break condition, and yeah it usually involvesval. like, that's the whole point bestie πsleep_usβ maximum time to sleep between reads, in us.0means tight-loops, which, ok, no rest for the wicked π. ngl please go read theusleep_rangefunction description for the details and limitations β fr fr, don't skip it.timeout_usβ timeout in us.0means never timeout, she waits forever π«Ά
π DESCRIPTION π
This one is modelled after the readx_poll_timeout macros over in linux/iopoll.h. that's the lore π§
β RETURN β
0on success β slay π-ETIMEDOUTupon a timeout- or the
regmap_field_readerror return value in case of an error read π
and in the two former cases (timeout and error read), the last read value at addr is stored in val. iconic behaviour honestly.
β οΈ must not be called from atomic context ifsleep_usortimeout_usare used. like seriously, do not, that's the danger zone ππ₯
π¦ SEE ALSO π¦
Kernel file ./include/linux/regmap.h β and the whole friend group:
struct reg_default(9)struct reg_sequence(9)regmap_read_poll_timeout(9)regmap_read_poll_timeout_atomic(9)struct regmap_range(9)struct regmap_access_table(9)struct regmap_config(9)struct regmap_range_cfg(9)struct regmap_sdw_mbq_cfg(9)struct regmap_bus(9)regmap_init(9)regmap_init_i2c(9)regmap_init_mdio(9)regmap_init_sccb(9)regmap_init_slimbus(9)regmap_init_spi(9)regmap_init_spmi_base(9)regmap_init_spmi_ext(9)regmap_init_w1(9)regmap_init_mmio_clk(9)regmap_init_mmio(9)regmap_init_ac97(9)regmap_init_sdw(9)regmap_init_sdw_mbq(9)regmap_init_sdw_mbq_cfg(9)regmap_init_i3c(9)regmap_init_spi_avmm(9)regmap_init_fsi(9)devm_regmap_init(9)devm_regmap_init_i2c(9)devm_regmap_init_mdio(9)devm_regmap_init_sccb(9)devm_regmap_init_spi(9)devm_regmap_init_spmi_base(9)devm_regmap_init_spmi_ext(9)devm_regmap_init_w1(9)devm_regmap_init_mmio_clk(9)devm_regmap_init_mmio(9)devm_regmap_init_ac97(9)devm_regmap_init_sdw(9)devm_regmap_init_sdw_mbq(9)devm_regmap_init_sdw_mbq_cfg(9)devm_regmap_init_slimbus(9)devm_regmap_init_i3c(9)devm_regmap_init_spi_avmm(9)devm_regmap_init_fsi(9)struct reg_field(9)struct regmap_irq_type(9)struct regmap_irq(9)struct regmap_irq_chip(9)
okay that's the whole page, you're welcome πβ¨
signed off with love from ./include/linux, dated October 2026 β iykyk ππ¦
π¦ 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