regmap_reinit_cache(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 of config? 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