regmap_multi_reg_write(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 serving regmap_multi_reg_write(9) energy. slay, stay hydrated, go write some registers πŸ’–βœ¨πŸŽ€
πŸ“¦ where this page comes from