platform_get_resource(9)
π platform_get_resource β like, the full glow-up β¨
okay bestie, pull up a chair π this one is from the Kernel API Manual, section 9, and it's genuinely one of those little functions that eats every single time. no cap.
πΈ NAME πΈ
platform_get_resource β get a resource for a device π
like, the resource. for your device. that's the whole vibe.
β¨ SYNOPSIS β¨
struct resource * platform_get_resource (struct platform_device *dev ,
unsigned int type , unsigned int num );
look at her. iconic signature. three args, one pointer back, zero drama π«Ά
π¦ ARGUMENTS π¦
devβ the platform device, aka the main character of this whole situation πtypeβ the resource type, like which flavour of resource you're asking fornumβ the resource index, because sometimes there's more than one and you gotta be specific π
β RETURN β
a pointer to the resource π β¦ or NULL on failure π (yes, always check. always. no skipping the vibe check.)
π SEE ALSO π
the kernel file ./drivers/base/platform.c β that's where she lives, home sweet home π
and literally the whole friend group, fr fr:
devm_platform_get_and_ioremap_resource(9)devm_platform_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)
and that's the page, bestie π§π sourced straight from ./drivers/base, dated October 2026, signed off with love and a little sparkle βππ
π¦ 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