ad7380_regval_to_osr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ad7380_regval_to_osr πŸ’…

okay so welcome to the Kernel API Manual bestie, today we're looking at ad7380_regval_to_osr β€” literally the little function that converts an OSR register value into a ratio ✨ that's the whole vibe, that's the whole job 🫢


✨ NAME ✨

ad7380_regval_to_osr β€” convert OSR register value to ratio πŸŽ€ no cap, that's it, that's the mission


🌸 SYNOPSIS 🌸

int ad7380_regval_to_osr (unsigned int regval );

like… that's the whole signature, she's short and she's iconic πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • regval β€” the register value you want to check πŸ’– this is the thing you're handing over, bestie, so she can do her little lookup

⭐ RETURN ⭐

she gives you back the ratio corresponding to the OSR register 🌈 that's the good path, that's the slay path

but hmm πŸ™ˆ if regval is not in bound, she returns 1 β€” which is oversampling disabled, so basically the "guess we're not doing that today" answer πŸ’€ not an error, not a crash, just 1, periodt


🧚 SEE ALSO 🧚


lowkey reminder that the ratio is the return, and 1 means oversampling is disabled β€” don't @ me, that's just what the manpage says πŸ’…

and that's the page!! mwah πŸ’– this gem lives over in ./drivers/iio/adc and the manual itself is dated October 2026, ad7380_regval_to_osr(9), Kernel API Manual β€” go off, king πŸ‘‘πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from