__acpi_node_...ty_reference(9)
π __acpi_node_...ty_reference(9) π
okay bestie, welcome to the Kernel API Manual β yes that's the manual name, we're being fancy today β¨ this one's a mouthful of a name (__acpi_node_...ty_reference(9), the truncated little icon that it is), so grab a strawberry drink π and let's get into it.
πΈ NAME πΈ
__acpi_node_get_property_reference β literally returns a handle to the referenced object. that's the whole vibe. π«Ά
β¨ SYNOPSIS β¨
int __acpi_node_get_property_reference (const struct fwnode_handle
*fwnode , const char *propname , size_t index , size_t num_args , struct
fwnode_reference_args *args );
like, look at all those parameters. main character energy fr fr π
π ARGUMENTS π
fwnodeβ the firmware node we're pulling the property from, iykyk πpropnameβ the name of the property. yes, this is the one we're hunting for πindexβ which reference in the lineup you want back. pick a number, any number π¦num_argsβ the max number of arguments allowed after each reference. cap it, periodt βargsβ where the returned reference (plus any optional arguments) gets stored. it may beNULL, no pressure π
π§ DESCRIPTION π§
so here's the tea β β this function finds the property with that name, checks that it's a package containing at least one object reference, and if it is (slay), it stores the ACPI device object pointer to the target object in args->adev. π― and if the reference comes with arguments? those get stashed in the args->args[] array. obsessed. π
if there's more than one reference chillin' in the property value package, index is what picks which one you get back. lowkey the whole point of it. π₯
and here's the cute part β you can literally leave holes in the property value set, like this:
Package () { "cs-gpios", Package () { ^GPIO, 19, 0, 0, ^GPIO, 20, 0, 0, 0, ^GPIO, 21, 0, 0, } }
call this function with index 2 or index 3 and you get -ENOENT bestie π it's not a bug, it's a gap. and if the property doesn't contain any more values, -ENOENT is returned too. the NULL entry must be a single integer and preferably contain the value 0. noted, no cap. π
β RETURN β
0on success π₯³- a negative error code on failure π
π¦ SEE ALSO π¦
kernel file ./drivers/acpi/property.c, plus the whole friend group:
acpi_data_get_property(9)acpi_dev_get_property(9)acpi_node_prop_get(9)acpi_data_get_property_array(9)acpi_node_prop_read(9)acpi_node_get_parent(9)acpi_graph_get_next_endpoint(9)acpi_graph_get_child_prop_value(9)acpi_graph_get_remote_endpoint(9)
ok real talk, thatargsparameter being allowed to beNULLis genuinely iconic β do with that what you will π«Ά
and that's the page!! signed, sealed, delivered from ./drivers/acpi, dated October 2026, still rocking the __acpi_node_...ty_reference(9) title like the queen it is. mwah ππ
π¦ 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