regmap_raw_write_async(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… regmap_raw_write_async(9) β€” a.k.a. the Kernel API Manual page you're literally about to understand

okay bestie, settle in πŸŽ€ this one lives in the Kernel API Manual and it's honestly kind of a baddie. It's one function, it does exactly one thing, and it does it fast.


✨ NAME ✨

regmap_raw_write_async β€” write raw values to one or more registers asynchronously πŸ¦‹


✨ SYNOPSIS ✨

int regmap_raw_write_async (struct regmap *map , unsigned int reg ,
                            const void *val , size_t val_len );

ngl that signature is giving "four args, no notes" πŸ’…


✨ ARGUMENTS ✨

  • map β€” the register map you're writing to. Your target. The main character of this whole operation πŸ‘‘
  • reg β€” the initial register to write to. Like, where the party starts.
  • val β€” the block of data to be written, laid out for direct transmission to the device. No formatting, no vibes check, no nothing β€” it goes out exactly as-is. 🚨 Important: this pointer must stay valid until regmap_async_complete is called. Like, do not let it wander off and get freed while the bus is still working, I am begging 😭
  • val_len β€” the length of the data that val points to. Yes, you have to tell it. It's not gonna count for you, bestie.

✨ DESCRIPTION ✨

So this function is built for situations like firmware download β€” you know, the classic "I have a huge block of data and it all needs to get to the device" moment. 🌈 And the whole point: no formatting will be done on the data provided. Zero. None. It is what it is. Periodt.

If the underlying bus is cool with it, the write gets scheduled asynchronously β€” which is a fancy way of saying it helps you maximise I/O speed on higher speed buses like SPI πŸ”₯. Go off, throughput.

And whenever you want to be sure all those async writes have actually finished, you call regmap_async_complete. That's your "okay are we done yet" check 🫢

Returns: a value of zero on success πŸŽ‰, and a negative errno in the error cases πŸ’€.

lowkey remember: "zero good, negative errno bad." That's the whole personality test.

✨ SEE ALSO ✨

Kernel file ./drivers/base/regmap/regmap.c β€” and then, bestie, here comes the entire friend group πŸ’–:


aaaand that's the page!! 🧚 go forth and write your raw bytes asynchronously, you absolute icon πŸ’œ

./drivers/base/regmap 🫢 October 2026 β€” that's the where and the when, bestie, and this manpage has officially left the group chat 😭✌️

πŸ“¦ where this page comes from