STRUCT LINEAR_RANGE(9)
π 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
- 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