__fwnode_iio_simple_xlate(9)
π§ __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 theiio_devstructure. 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
- 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