regmap_update_bits_base(9)
π 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:
devm_regmap_field_alloc(9)regmap_field_bulk_alloc(9)devm_regmap_field_bulk_alloc(9)regmap_field_bulk_free(9)devm_regmap_field_bulk_free(9)devm_regmap_field_free(9)regmap_field_alloc(9)regmap_field_free(9)regmap_reinit_cache(9)regmap_exit(9)dev_get_regmap(9)regmap_get_device(9)regmap_can_raw_write(9)regmap_get_raw_read_max(9)regmap_get_raw_write_max(9)regmap_write(9)regmap_write_async(9)regmap_raw_write(9)regmap_noinc_write(9)regmap_field_update_bits_base(9)regmap_field_test_bits(9)regmap_fields_update_bits_base(9)regmap_bulk_write(9)regmap_multi_reg_write(9)regmap_multi_reg_write_bypassed(9)regmap_raw_write_async(9)regmap_read(9)regmap_read_bypassed(9)regmap_raw_read(9)regmap_noinc_read(9)regmap_field_read(9)regmap_fields_read(9)regmap_bulk_read(9)regmap_multi_reg_read(9)regmap_test_bits(9)regmap_async_complete(9)regmap_register_patch(9)regmap_get_val_bytes(9)regmap_get_max_register(9)regmap_get_reg_stride(9)regmap_might_sleep(9)
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
- 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