regmap_fiel...te_bits_base(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… regmap_fiel...te_bits_base(9) πŸ’…

okay so this is a page straight out of the Kernel API Manual bestie, and it's all about one very specific little function that does a read/modify/write glow-up on a register field. yes we're in the kernel, yes we're being cute about it, no the facts are not changing 🌸


✨ NAME ✨

regmap_field_update_bits_base β€” Perform a read/modify/write cycle a register field.

(grammar? never met her. the cycle is on the field and that's the tea β˜•)


πŸ¦‹ SYNOPSIS πŸ¦‹

int regmap_field_update_bits_base (struct regmap_field *field , unsigned
int mask , unsigned int val , bool *change , bool async , bool force );

like, six args, one return type, zero chill. it's giving "I take my job very seriously" πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • field β€” Register field to write to. this is your main character, the thing getting updated ✨
  • mask β€” Bitmask to change. the ~vibe check~ for which bits are even invited to the party
  • val β€” Value to be written. what you're actually putting in there, no cap
  • change β€” Boolean indicating if a write was done. so you can find out afterward whether anything actually happened 😭
  • async β€” Boolean indicating asynchronously. yes girl, we're doing it in the background
  • force β€” Boolean indicating use force update. when the register is being stubborn and you gotta be a little assertive πŸ’€

πŸ‘‘ DESCRIPTION πŸ‘‘

Perform a read/modify/write cycle on the register field with change, async, force option. that's the whole thing. read it, change the masked bits, write it back, and let those three little booleans tweak the behavior πŸ”₯

A value of zero will be returned on success, a negative errno will be returned in error cases. so: 0 = slay, negative = not slay, and the errno will tell you exactly why. periodt 🫢

ngl bestie, don't ignore the negative return β€” that's your error report and it is NOT decorative πŸ’€

🌈 SEE ALSO 🌈

Kernel file ./drivers/base/regmap/regmap.c, and honestly the whole friend group shows up here:

like I said. the whole group chat πŸ’œ


and that's the page, bestie ✨ this icon came to you from ./drivers/base/regmap, dated October 2026 β€” mwah, go update some bits responsibly πŸŽ€πŸ’–

πŸ“¦ where this page comes from