device_node_to_regmap(9)
πΈ 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 π
- Kernel file
./drivers/mfd/syscon.c of_syscon_register_regmap(9)syscon_node_to_regmap(9)
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
- 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