acpi_create_platform_device(9)
β¨ acpi_create_platform_device β¨
okay so bestie, we're in the Kernel API Manual</> today, section 9 β and the function on the menu is acpi_create_platform_device, which is literally the glow-up machine that turns an ACPI device node into a platform device. yes ma'am, we're doing firmware-to-platform matchmaking π
π SYNOPSIS π
struct platform_device * acpi_create_platform_device (struct acpi_device
*adev , const struct property_entry *properties );
like, look at her. returning a struct platform_device * and everything. main character energy fr fr π«Ά
πΈ ARGUMENTS πΈ
adevβ the ACPI device node you want a platform device for. this is the one getting the makeover πpropertiesβ an optional collection of build-in properties. optional!! so you can totally leave it out, no pressure π¦
π« DESCRIPTION π«
so here's the vibe check: the function first checks whether the given adev can even be represented as a platform device. if that's the case, it creates and registers a platform device, populates its common resources, and returns a pointer to it. slay β¨
if it can't? it returns NULL. not every ACPI node gets to be a platform device, and that's okay π
and the bestie detail: the name of the platform device will be the same as adev's. same name, same energy, no cap π
lowkey important: aNULLreturn here isn't necessarily an error situation β it literally just means thisadevisn't representable as a platform device, iykyk.
π₯ SEE ALSO π₯
- Kernel file
./drivers/acpi/acpi_platform.cβ go read the source, it's giving iconic behavior π§
and that's the whole page bestie β brought to you by the fine folks at</> ./drivers/acpi, dated</> October 2026, for</> acpi_create_platform_device(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