STRUCT LINEAR_RANGE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct linear_range(9) πŸ’–

okay bestie, welcome to the Kernel API Manual β€” this one's a lil struct called struct linear_range and honestly? she's giving lookup-table royalty πŸ‘‘βœ¨


🌸 NAME 🌸

struct linear_range β€” a whole table of selector ⟷ value pairs, no cap πŸŽ€


✨ SYNOPSIS ✨

struct linear_range {
    unsigned int min;
    unsigned int min_sel;
    unsigned int max_sel;
    unsigned int step;
 };

🫢 Members 🫢

  • min β€” the lowest value in the range, fr the bottom of the vibe check πŸ’…
  • min_sel β€” the lowest selector for the range πŸ“
  • max_sel β€” the highest selector for the range πŸ”₯
  • step β€” the value step size, like how much we're incrementing each time ⭐

πŸ¦‹ Description πŸ¦‹

So what she does: this defines a lookup-table for a range of values πŸ’– The whole point is to help you out when you're looking for a register value that matches a certain physical measure (like voltage, bestie β€” think voltage ⚑).

She's usable when an increment of one in the register always results in a constant increment of the physical measure (like voltage, again 😌). Like, one step up in the register = one steady step up in the real-world number. Consistent. Iconic. Periodt πŸ’…


🌈 SEE ALSO 🌈

Kernel file ./include/linux/linear_range.h 🧚


okay that's the whole page, you ate that 🫢 stay slay, go read that header file bestie πŸ’œ

mwah πŸ’‹ β€” this one's from ./include/linux, dated October 2026 βœ¨πŸŽ€

πŸ“¦ where this page comes from