wm8904_read_cfg_reg_arr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… wm8904_read_cfg_reg_arr β€” the kernel API manual, bestie edition ✨

okay so real quick before we dive in: this whole page lives in the Kernel API Manual, section 9, and the star of the show is literally called wm8904_read_cfg_reg_arr. iconic name, no notes. πŸŽ€


🌸 NAME 🌸

wm8904_read_cfg_reg_arr β€” Reads a subarray from a DT u16 array ✨

like… it just grabs a little slice out of a device-tree array for you. that's the whole vibe. 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

int wm8904_read_cfg_reg_arr (const struct device_node *np , const char *
const regs_property , int size , int idx , u16 * const out );

copy it exactly like that, bestie β€” every const, every pointer star, every space. do not freestyle this one. πŸ’€


πŸ‘‘ ARGUMENTS πŸ‘‘

here's the lineup, one by one, no skipping:

  • np β€” pointer to the device_node struct πŸ’– this is the node we're reading from, periodt.
  • regs_property β€” DT property of interest 🌟 the one we actually wanna look at.
  • size β€” size of subarrays within the array ✨ so the big array gets chopped into equal chunks, and this is how big each chunk is.
  • idx β€” index of the subarray of interest πŸ”₯ which chunk you're asking for, bestie.
  • out β€” output πŸ’… where the answer lands.

🌈 DESCRIPTION 🌈

so basically: this is a helper to read a subarray from a DT uint16-array, divided into equally sized arrays of size. ✨ it's giving "personal assistant for device-tree data."

the subset starts at idx * size and is of size size. πŸ”’ that's the math, that's the whole thing, and it ate. no cap.

like, you've got one giant array? cool. but you only want one little equally-sized slice of it? that's literally what this function is for. main character energy for subarrays only. πŸ‘‘


⭐ RETURN ⭐

0 on success, negative error code otherwise. πŸ’€ so like… zero means slay, negative means something went sideways. check it, always. πŸ™ˆ


🧚 SEE ALSO 🧚

  • Kernel file ./sound/soc/codecs/wm8904.c β€” go read it, iykyk πŸ“

aaaand that's the page! brought to you by ./sound/soc/codecs and dated October 2026 β€” that's the source and version + date sign-off, all cute and accounted for. πŸ’œβœ¨ go forth and read your subarrays, bestie. πŸŽ€

πŸ“¦ where this page comes from