device_node_to_regmap(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 device_node_to_regmap(9) 🌸

okay so bestie, welcome to the Kernel API Manual, section 9 β€” this one's about device_node_to_regmap and it's honestly such a handy little function. let me put you on πŸ’…


✨ NAME ✨

device_node_to_regmap β€” get or create a regmap for a specified device node. yes, get OR create, she does both, main character energy fr fr πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

struct regmap * device_node_to_regmap (struct device_node *np );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • np β€” the device tree node. that's it, that's the whole argument, she's lowkey minimal 🌸

πŸ’– DESCRIPTION πŸ’–

so here's the vibe: you call this and you get a regmap for the specified device node. and if there's not already an existing regmap? no worries bestie, one gets instantiated for you right then and there. iconic behavior honestly ✨

⚠️ but listen β€” do not use this function if the device node has a custom regmap driver, or if it has resources (clocks, resets) that need to be managed. like, that's not her job. for those cases you use syscon_node_to_regmap instead, okay? periodt. πŸ™ˆ

πŸ”₯ RETURN πŸ”₯

  • regmap ptr on success πŸ’–
  • negative error code on failure πŸ’€

🌈 SEE ALSO 🌈

go read those too, iykyk 🫢


okay that's the whole page!! mwah πŸ’‹ this came from ./drivers/mfd, dated October 2026 β€” so you know it's fresh. now go forth and regmap responsibly, bestie πŸ§šβ€β™€οΈβ­πŸŽ€

πŸ“¦ where this page comes from