devm_platfor...map_resource(9)
π devm_platfor...map_resource(9) β the group chat edition π
okay so bestie, welcome to the Kernel API Manual β¨ β this one lives in ./drivers/base, so you know it's platform-device territory. pull up a chair, we're talking about devm_platform_ioremap_resource and honestly? she's lowkey a lifesaver. π«Ά
πΈ NAME πΈ
devm_platform_ioremap_resource β literally just calls devm_ioremap_resource() for a platform device. that's the whole vibe. no cap, that's it. π
β¨ SYNOPSIS β¨
void __iomem * devm_platform_ioremap_resource (struct platform_device
*pdev , unsigned int index );
look at her. returns a void __iomem *, takes a pdev and an index. iconic signature, no notes. π
π¦ ARGUMENTS π¦
pdevβ the platform device, main character energy fr fr. you're handing her over to be used for both the memory resource lookup and the resource management. like, she does double duty, she's serving. πindexβ the resource index. which one?? this one. that's the one. π
π₯ RETURN π₯
a pointer to the remapped memory π β OR an ERR_PTR encoded error code if it fails π. so yeah, check your IS_ERR() bestie, don't just rawdog the dereference. π
ngl, an ERR_PTR-encoded error means the "pointer" might not be a pointer at all. treat it accordingly, okurrr? π
π SEE ALSO π
the whole fam, in this exact order because we don't disrespect the list:
- Kernel file
./drivers/base/platform.c platform_get_resource(9)devm_platform_get_and_ioremap_resource(9)devm_platform_ioremap_resource_byname(9)platform_get_irq_affinity(9)platform_get_irq_optional(9)platform_get_irq(9)platform_irq_count(9)devm_platform_get_irqs_affinity(9)platform_get_resource_byname(9)platform_get_irq_byname(9)platform_get_irq_byname_optional(9)platform_add_devices(9)platform_device_put(9)platform_device_alloc(9)platform_device_add_resources(9)platform_device_add_data(9)platform_device_set_of_node(9)platform_device_set_fwnode(9)platform_device_set_of_node_from_dev(9)platform_device_add(9)platform_device_del(9)platform_device_register(9)platform_device_unregister(9)platform_device_register_full(9)__platform_driver_register(9)platform_driver_unregister(9)__platform_driver_probe(9)__platform_create_bundle(9)__platform_register_drivers(9)platform_unregister_drivers(9)platform_match(9)platform_find_device_by_driver(9)
like, that's a whole friend group. invite them all to the function call. πΈπ¦
sign-off time, bestie π«Ά this page is brought to you by ./drivers/base, dated October 2026, and it answers to the name devm_platfor...map_resource(9). periodt. πβ
π¦ 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