regmap_reinit_cache(9)
π regmap_reinit_cache β Kernel API Manual β¨
okay so bestie, welcome to regmap_reinit_cache(9) β yes that's the real man page name, the (9) is giving "I live in the kernel section" and honestly? iconic. this whole page lives in the Kernel API Manual, and it's short, it's sweet, and it's about to nuke your register cache and give you a fresh one. periodt. π
β¨ NAME β¨
regmap_reinit_cache β Reinitialise the current register cache π«
like, reinitialise. as in start over. as in out with the old cache, in with the new. no cap.
πΈ SYNOPSIS πΈ
int regmap_reinit_cache (struct regmap *map , const struct regmap_config
*config );
yes, it returns an int, yes it takes a struct regmap *map and a const struct regmap_config *config, and yes you do need to pass both. not me being picky, that's literally the signature π«Ά
π¦ ARGUMENTS π¦
mapβ the register map you're operating on. this is your main character right here, the map whose cache is about to get a whole new life. πconfigβ the new configuration. heads up bestie: only the cache data will be used from this. the rest ofconfig? not invited to the party. π
π DESCRIPTION π
so here's the vibe: this function discards any existing register cache for the map and initializes a new cache. that's it, that's the whole thing. toss the old one, spin up a fresh one. π
and like, when would you even want that? two very valid reasons, fr fr:
- to restore the cache to defaults π
- to update the cache configuration to reflect runtime discovery of the hardware π₯
very "we didn't know what the hardware was at probe time, but now we do" of you. we love runtime discovery.
β οΈ okay but READ THIS: no explicit locking is done here. none. zero. the user needs to ensure that this function will not race with other calls to regmap. that's on YOU bestie, this function is not your bodyguard. if you race it, that's giving undefined behaviour energy and we don't do that here π
π§ SEE ALSO π§
the whole regmap friend group showed up, and honestly the group chat is POPPIN'. kernel file ./drivers/base/regmap/regmap.c plus:
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_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(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 whole page, bestie. no filler, all real ones. π
sign-off time: this lil number comes from the source dir ./drivers/base/regmap and it's dated October 2026. screenshot it, frame it, put it on your wall. mwah πβ¨
π¦ 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