device_prope...ad_u16_array(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌈 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 or NULL to return the number of values. cute.
  • nval β€” Size of the val array. 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 val was NULL β€” the count girlie.
  • 0 if the property was found (success) β€” we love a win.
  • -EINVAL if given arguments are not valid β€” check ur args, bestie.
  • -ENODATA if the property does not have a value β€” no data, no drama.
  • -EPROTO if the property is not an array of numbers β€” not the numeric array vibe.
  • -EOVERFLOW if the size of the property is not as expected β€” size said no.
  • -ENXIO if no suitable firmware interface is present. β€” no interface, no entry.

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file: ./drivers/base/property.c


that's the whole page, bestie 🫢 source/version: ./drivers/base Β· October 2026 Β· device_prope...ad_u16_array(9) β€” mwah πŸ’‹

πŸ“¦ where this page comes from