regmap_raw_write_async(9)
π 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 untilregmap_async_completeis 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 thatvalpoints 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 π:
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_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)
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
- 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