devm_regmap_init_mdio(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ devm_regmap_init_mdio(9) β€” the managed-regmap glow-up, MDIO edition πŸŽ€

okay so bestie, welcome to devm_regmap_init_mdio from the Kernel API Manual ✨ this is the one that sets you up with a register map over MDIO and handles the cleanup for you, because we do not do manual regmap_exit in this house πŸ’…


✨ SYNOPSIS ✨

devm_regmap_init_mdio (mdio_dev , config );

🌸 ARGUMENTS 🌸

  • mdio_dev β€” the device you're gonna be interacting with 🫢 like, that's your buddy for the whole operation
  • config β€” the configuration for the register map πŸŽ€ everything it needs to know about how you want it set up

πŸ’– DESCRIPTION πŸ’–

so what do you even get back? the return value is gonna be an ERR_PTR on error 😭 or, if the vibes are correct, a valid pointer to a struct regmap πŸ‘‘ and here's the iconic part: that regmap gets automatically freed by the device management code ✨ not you. never you. the managed-devm machinery is the main character here and she's got it fr fr πŸ’…

lowkey the whole point: you get the register map, you forget about it, device management handles the goodbye πŸ¦‹

🌈 SEE ALSO 🌈

Kernel file ./include/linux/regmap.h β€” and here's the whole friend group, no cap, every single one:


and that's the whole page, bestie πŸ“ this lil drop of documentation lives in ./include/linux, dated October 2026, and it's filed under devm_regmap_init_mdio(9) πŸ’œ go forth and init some managed register maps, you absolute icon 🧚

πŸ“¦ where this page comes from