regmap_read(9)
π regmap_read(9) β the Kernel API Manual glow-up β¨
okay so bestie, welcome to regmap_read(9) from the Kernel API Manual β this is the little function that goes "hey register map, what's in this one register?" and honestly? iconic. π
πΈ SYNOPSIS πΈ
int regmap_read (struct regmap *map , unsigned int reg , unsigned int
*val );
like, it returns an int, takes a struct regmap * called map, an unsigned int called reg, and a unsigned int pointer called val. three args, no drama. π
β¨ ARGUMENTS β¨
mapβ the register map you're reading from πΊοΈ like, this is the whole vibe of where your registers live.regβ the specific register you want to read from. yes, that one. π―valβ a pointer where the read value gets stored. she's just a vessel, holding your data for you π«Ά
π DESCRIPTION π
so here's the tea: a value of zero gets returned on success, and a negative errno gets returned in error cases. that's it, that's the whole description. no cap. π
lowkey the most important thing to remember:0= slay, negativeerrno= something went wrong, check it fr fr π
π¦ SEE ALSO π¦
the friend group is BIG, bestie. buckle up. π
Kernel file ./drivers/base/regmap/regmap.c β plus all of these cuties:
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_raw_write_async(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, that's a whole group chat right there. mwah. π
and that's the page! π this little beauty lives in ./drivers/base/regmap and the docs are dated October 2026 β so mark your calendar, bestie, and go read 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