__fwnode_iio_simple_xlate(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🧚 __fwnode_iio_simple_xlate(9) β€” the Kernel API Manual, bestie edition πŸ’–

okay so picture this: you're deep in the kernel, it's the Kernel API Manual, and you just need one tiny little translation done. that's literally this whole page. no cap. ✨


🌸 NAME 🌸

__fwnode_iio_simple_xlate β€” the little function that translates iiospec into the IIO channel index. that's it. that's the job. and it ate. πŸ’…


πŸ’œ SYNOPSIS πŸ’œ

int __fwnode_iio_simple_xlate (struct iio_dev *indio_dev , const struct
       fwnode_reference_args *iiospec );

like, it takes two things and hands you back an int. iconic behaviour honestly. 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • indio_dev β€” a pointer to the iio_dev structure. your main character struct, your fave. πŸ‘‘
  • iiospec β€” the IIO specifier, exactly as found in the device tree. it walked in straight from the DT, no notes. 🌈

πŸ¦‹ DESCRIPTION πŸ¦‹

so this is the simple translation function β€” hence the name, she's not trying to be mysterious β€” and she's perfect for the most 1:1 mapped channels in IIO chips. like, if your channels are a straightforward little one-to-one situation, this is your girl. πŸ’–

now, don't go expecting her to do a whole background check on your data. she performs only one sanity check:

is the IIO index less than num_channels? πŸ‘€

and num_channels is the one specified in the iio_dev. that's the whole vibe check. one check, one pass/fail, no drama. periodt. πŸ’€


⭐ SEE ALSO ⭐

  • Kernel file ./drivers/iio/inkern.c β€” go read it, iykyk πŸ“

okay bestie that's the page!! stay slay, may your indices always stay under num_channels, and remember where this came from: ./drivers/iio, October 2026, from your one and only Kernel API Manual πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from