devm_regmap_init(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

devm_regmap_init β€” Initialise managed register map

Okay so hi bestie πŸ’– welcome to devm_regmap_init(9), live from the Kernel API Manual. This is the managed-register-map init situation, and yes it's giving kernel-core realness πŸ‘‘


✨ SYNOPSIS ✨

devm_regmap_init (dev , bus , bus_context , config );

πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” The device that will be interacted with 🫢
  • bus β€” Bus-specific callbacks to use with the device ✨
  • bus_context β€” Data passed to those bus-specific callbacks πŸ’…
  • config β€” Configuration for the register map πŸŽ€

πŸ¦‹ DESCRIPTION πŸ¦‹

So the return value is either an ERR_PTR on error, or a valid pointer to a struct regmap. That's the whole vibe check: error pointer or actual regmap pointer, no in-between 😌

This function should generally not be called directly β€” it should be called by bus-specific init functions. Like, it's the backstage pass, not the main entrance πŸ’€

The map will be automatically freed by the device management code. Managed means managed, bestie ✨

⚠️ real talk: don't just call devm_regmap_init directly, fr fr β€” let the bus-specific init functions handle it. The auto-free is handled by the device management code, and that's iconic 🫢

🌈 SEE ALSO 🌈

Kernel file ./include/linux/regmap.h β€” and here's the whole friend group πŸ‘―β€β™€οΈ:


And that's the page, bestie 🫢 cute little sign-off time: the footer energy is source/version path ./include/linux and date October 2026 β€” periodt πŸ’…βœ¨

πŸ“¦ where this page comes from