devm_platfo...ource_byname(9)
π devm_platform_ioremap_resource_byname β¨
okay bestie, welcome to the Kernel API Manual π β this one's a (9) section page, which is the fancy way of saying "kernel internals, put your seatbelt on" π¦
πΈ NAME πΈ
devm_platform_ioremap_resource_byname β it literally calls devm_ioremap_resource for a platform device, but it goes and fetches the resource by name instead of by index. it's giving "i know exactly which one i want" energy π
β¨ SYNOPSIS β¨
void __iomem * devm_platform_ioremap_resource_byname (struct
platform_device *pdev , const char *name );
that's the whole signature. two args. returns a void __iomem *. slay π
π«Ά ARGUMENTS π«Ά
pdevβ the platform device you're working with, and the way it does double duty is iconic: it's used for the memory resource lookup and for the resource management (yes, both, same struct, main character energy π₯)nameβ the name of the resource you're looking for. that's it. that's the string πΈ
π RETURN π
you get back a pointer to the remapped memory π β OR, and this is the important bit, an ERR_PTR encoded error code on failure π so please, for the love of everything, check it before you dereference it. no cap.
π SEE ALSO π
the whole friend group, in the order the page lists them, and yes i'm listing every single one because we do not skip the boring parts here π«Ά
Kernel file ./drivers/base/platform.c and then:
platform_get_resource(9)devm_platform_get_and_ioremap_resource(9)devm_platform_ioremap_resource(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 the whole platform.c extended universe and honestly? obsessed π
side note bestie: the page header was devm_platfo...ource_byname(9) both before and after β truncated name, full vibes. genuinely iconic of the manpage formatter π
π« that's the page! π« source path ./drivers/base, dated October 2026, and it's the Kernel API Manual's devm_platfo...ource_byname(9) β bye bestie, go check your ERR_PTRs ππβ¨
π¦ 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