ad7380_osr_to_regval(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ad7380_osr_to_regval β€” the Kernel API Manual's cutest little ratio-translator ✨

okay so bestie, welcome to the Kernel API Manual πŸŽ€ and buckle up because this function is short but she is mighty.


🌸 NAME 🌸

ad7380_osr_to_regval β€” literally converts a ratio into an OSR register value. that's it. that's the whole job. and she does it flawlessly πŸ’–


✨ SYNOPSIS ✨

int ad7380_osr_to_regval (int ratio );

ngl, one function, one argument, zero drama 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • ratio β€” the ratio you wanna check πŸ‘€ that's the whole thing, she's just a number walking in asking "do I belong here?"

πŸ’œ DESCRIPTION πŸ’œ

okay so here's the vibe check πŸ”₯ this function checks whether ratio is actually present in the list of available ratios β€” like, is she on the guest list or not πŸ’…

and if she is on the list? boom πŸ’₯ you get back the corresponding value that needs to be written to the register to select that ratio. it's giving translator, it's giving matchmaker, it's giving iconic 🌈

no cap, this is a "find my ratio's register value" moment and it ate πŸ“


⭐ RETURN ⭐

  • the register value, which lives in the range 0 to 7 πŸ‘‘
  • -EINVAL if there is not an exact match 😭 β€” no partial credit, no "close enough", she needs the exact ratio or it's a no from her fr fr

πŸ”₯ SEE ALSO πŸ”₯


and that's the page, bestie β€” from the Kernel API Manual, the ./drivers/iio/adc directory, dated October 2026 πŸ’– mwah, go forth and match your ratios πŸ§šβ€β™€οΈπŸŽ€

πŸ“¦ where this page comes from