regmap_update_bits_base(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… regmap_update_bits_base(9) β€” the glow-up your register deserves

okay bestie, so we're in the Kernel API Manual today and this page is about regmap_update_bits_base β€” the read/modify/write icon herself. no cap, she's a little more extra than plain regmap_update_bits because she's got options. πŸŽ€


✨ NAME ✨

regmap_update_bits_base β€” do a whole read/modify/write cycle on a register, but make it fashion πŸ’…


🌸 SYNOPSIS 🌸

int regmap_update_bits_base (struct regmap *map , unsigned int reg ,
       unsigned int mask , unsigned int val , bool *change , bool async , bool
       force );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • map β€” the register map you're updating, bestie. the main character struct.
  • reg β€” which register we're touching. literally the address of the drama.
  • mask β€” the bitmask to change. only these bits get the glow-up. ✨
  • val β€” the new value for that bitmask. this is what the bits are gonna be serving after.
  • change β€” a boolean that tells you if a write actually happened. like, did we do something? 🫢
  • async β€” boolean, are we doing this asynchronously?
  • force β€” boolean, are we using the force update? (yes, force update. feel the force 🧚)

πŸ”₯ DESCRIPTION πŸ”₯

So the whole vibe: perform a read/modify/write cycle on a register map β€” but with change, async, and force options in the mix. it's giving "I can do the basic thing but with flair". πŸ‘‘

If async is true:

with most buses the read has to be done synchronously β€” yes, even though you asked for async, the read is still doing its little synchronous walk 😭 β€” so this option is most useful for devices with a cache, the ones that don't need to go talk to the actual hardware just to figure out what the current register value is. iykyk.

Returns zero for success, and a negative number on error. that's it, that's the vibe check. ⭐


πŸ’œ SEE ALSO πŸ’œ

Kernel file ./drivers/base/regmap/regmap.c, plus this absolutely iconic squad right here β€” not me listing all of them, but the manpage said so and I respect the assignment:


and that's the page, bestie 🫢 this one lives in ./drivers/base/regmap, it's from the October 2026 era, and it's brought to you by the Kernel API Manual. go forth and modify those bits responsibly. πŸ“πŸ’–

πŸ“¦ where this page comes from