of_property_count_u16_elems(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ NAME πŸŽ€

okay bestie, this is the of_property_count_u16_elems(9) page from the Kernel API Manual, and the function of_property_count_u16_elems is literally here to count the number of u16 elements in a property. iconic behavior, no notes πŸ’…βœ¨


✨ SYNOPSIS ✨

int of_property_count_u16_elems (const struct device_node *np , const char *propname );

periodt, that's the whole signature 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • np β€” the device node from which the property value is to be read. like, which node are we reading from? that one πŸ”
  • propname β€” the name of the property to be searched. the property's lil name tag 🏷️

🌸 DESCRIPTION 🌸

Search for a property in a device node and count the number of u16 elements in it. that's the vibe check, and it passes βœ…


πŸ’– RETURN πŸ’–

  • the number of elements on success β€” slay πŸ”₯
  • -EINVAL if the property does not exist or its length does not match a multiple of u16 β€” not the right shape, bestie 😭
  • -ENODATA if the property does not have a value β€” empty vibes πŸ’€

🌈 SEE ALSO 🌈

Kernel file: ./include/linux/of.h β€” the source with the receipts πŸ“βœ¨ and then the whole friend group:


mwah πŸ’‹ this page lives under ./include/linux, dated October 2026, and it's all about of_property_count_u16_elems(9) β€” byeee bestie! πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from