STRUCT HSC_DATA(9)
π NAME π
struct hsc_data β okay so bestie, the manpage literally gives us nothing after that dash. Empty. A void. The description is giving mysterious main character energy π β so we're gonna let the struct speak for itself, and she has so much to say.
β¨ SYNOPSIS β¨
struct hsc_data {
struct device *dev;
const struct hsc_chip_data *chip;
hsc_recv_fn recv_cb;
bool is_valid;
s32 pmin;
s32 pmax;
u32 outmin;
u32 outmax;
u32 function;
s64 p_scale;
s32 p_scale_dec;
s64 p_offset;
s32 p_offset_dec;
struct {
__be16 chan[2];
aligned_s64 timestamp;
} scan;
u8 buffer[HSC_REG_MEASUREMENT_RD_SIZE];
};
Look at her. Iconic. No cap, that's the whole vibe right there π
π«Ά Members π«Ά
Time for the roll call, bestie β every single member, no skips, no skipsies π₯
devβ the current device structure, aka the whole reason we're here πchipβ structure containing the chip's channel properties. It's giving "know your hardware" β¨recv_cbβ the function that implements the chip reads. She does the actual work around here πis_validβtrueif the last transfer has been validated β . So like, did the last read actually pass the vibe check or notpminβ minimum measurable pressure limit πΈpmaxβ maximum measurable pressure limit πoutminβ minimum raw pressure in counts (based on transfer function)outmaxβ maximum raw pressure in counts (based on transfer function)functionβ transfer function. The math girlie of the group πp_scaleβ pressure scalep_scale_decβ pressure scale, decimal placesp_offsetβ pressure offsetp_offset_decβ pressure offset, decimal placesbufferβ raw conversion data. The unfiltered, unedited, pre-glow-up version of your measurements π
Ngl bestie,pmin/pmaxandoutmin/outmaxare two different pairs β one's the real-world pressure limits, one's the raw counts. Do not mix them up, I'm literally begging π
π SEE ALSO π
- Kernel file
./drivers/iio/pressure/hsc030pa.hβ go read her, she's the source of truth π¦
Okay that's the whole page, bestie β you ate that π
β¨ If you need me I'll be in ./drivers/iio/pressure, and this whole thing is dated October 2026, so yes, we're being very future-forward about it π§π
π¦ 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