regmap_multi_reg_write(9)
π regmap_multi_reg_write(9) β the Kernel API Manual page, but make it make sense π
okay so bestie, gather round, because this one is from the Kernel API Manual and it's genuinely iconic once you get what it's doing β¨
πΈ NAME πΈ
regmap_multi_reg_write β write multiple registers to the device, all at once, no cap π
β¨ SYNOPSIS β¨
int regmap_multi_reg_write (struct regmap *map , const struct
reg_sequence *regs , int num_regs );
lowkey a whole mouthful but we move π«Ά
π¦ ARGUMENTS π¦
mapβ the register map you're writing to. this is the main character of the operation tbh πregsβ an array of structs, and each one holds a register + the value you wanna write into it πnum_regsβ how many registers you're writing, bestie. literally just the count π
π₯ DESCRIPTION π₯
So here's the vibe: you write multiple registers to the device in one go, and the set of register/value pairs? they get supplied in any order β possibly not all in a single range. not me loving the chaos π
Now for the part that actually eats π β the 'normal' block write mode ends up sending data on the target bus like this:
R,V1,V2,V3,..,Vn
where successively higher registers are addressed. makes sense, right? sequential, chill, very demure β¨
But this alternative block multi write mode is built different β it sends the data like this instead:
R1,V1,R2,V2,..,Rn,Vn
so every single register gets paired up with its own value right there on the target bus. the target device must of course support the mode β no assumptions, no vibes-only engineering, check first fr fr π§
and the return values? a value of zero comes back on success π a negative errno comes back in error cases π that's the whole story.
β SEE ALSO β
the kernel file ./drivers/base/regmap/regmap.c, plus this whole friend group right here β say hi to all of them π
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_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)
π«Ά and that's the page!! sourced from./drivers/base/regmap, version dated October 2026, still proudly servingregmap_multi_reg_write(9)energy. slay, stay hydrated, go write some registers πβ¨π
π¦ 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