device_prope...ad_u16_array(9)
π device_property_read_u16_array(9) β Kernel API Manual glow-up π
okay so bestie, welcome to the Kernel API Manual page for device_property_read_u16_array(9). This is the one that returns a u16 array property of a device, and we're gonna read it together. no cap. π
β¨ NAME β¨
device_property_read_u16_array β return a u16 array property of a device. periodt.
π SYNOPSIS π
int device_property_read_u16_array (const struct device *dev , const char *propname , u16 *val , size_t nval );
π¦ ARGUMENTS π¦
devβ Device to get the property of. main character device energy.propnameβ Name of the property. iykyk.valβ The values are stored here orNULLto return the number of values. cute.nvalβ Size of thevalarray. don't forget this one.
πΈ DESCRIPTION πΈ
Function reads an array of u16 properties with propname from the device firmware description and stores them to val if found. slay. β¨
It's recommended to call device_property_count_u16 instead of calling this function with val equals NULL and nval equals 0. lowkey important, bestie.
π₯ RETURN π₯
Here's the vibe check on what comes back: π
- number of values if
valwasNULLβ the count girlie. 0if the property was found (success) β we love a win.-EINVALif given arguments are not valid β check ur args, bestie.-ENODATAif the property does not have a value β no data, no drama.-EPROTOif the property is not an array of numbers β not the numeric array vibe.-EOVERFLOWif the size of the property is not as expected β size said no.-ENXIOif no suitable firmware interface is present. β no interface, no entry.
π SEE ALSO π
Kernel file: ./drivers/base/property.c
device_property_present(9)fwnode_property_present(9)device_property_read_bool(9)fwnode_property_read_bool(9)device_property_read_u8_array(9)device_property_read_u32_array(9)device_property_read_u64_array(9)device_property_read_string_array(9)device_property_read_string(9)device_property_match_string(9)fwnode_property_read_u8_array(9)fwnode_property_read_u16_array(9)fwnode_property_read_u32_array(9)fwnode_property_read_u64_array(9)fwnode_property_read_string_array(9)fwnode_property_read_string(9)fwnode_property_match_string(9)fwnode_property_match_property_string(9)fwnode_property_get_reference_args(9)fwnode_find_reference(9)fwnode_get_name(9)fwnode_get_name_prefix(9)fwnode_name_eq(9)fwnode_get_parent(9)fwnode_get_next_parent(9)fwnode_count_parents(9)fwnode_get_nth_parent(9)fwnode_get_next_child_node(9)fwnode_get_next_available_child_node(9)device_get_next_child_node(9)fwnode_get_named_child_node(9)device_get_named_child_node(9)fwnode_handle_get(9)fwnode_device_is_available(9)fwnode_get_child_node_count(9)fwnode_get_named_child_node_count(9)fwnode_get_phy_mode(9)device_get_phy_mode(9)fwnode_iomap(9)fwnode_irq_get(9)fwnode_irq_get_byname(9)fwnode_graph_get_next_endpoint(9)fwnode_graph_get_port_parent(9)fwnode_graph_get_remote_port_parent(9)fwnode_graph_get_remote_port(9)fwnode_graph_get_remote_endpoint(9)fwnode_graph_get_endpoint_by_id(9)fwnode_graph_get_endpoint_count(9)fwnode_graph_parse_endpoint(9)fwnode_connection_find_match(9)fwnode_connection_find_matches(9)
that's the whole page, bestie π«Ά source/version: ./drivers/base Β· October 2026 Β· device_prope...ad_u16_array(9) β 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