regmap_fiel...te_bits_base(9)
π 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 partyvalβ Value to be written. what you're actually putting in there, no capchangeβ 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 backgroundforceβ 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:
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_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_update_bits_base(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)
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
- 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