STRUCT HIH6130(9)
β¨ struct hih6130(9) β¨
okay so bestie, welcome to the Kernel API Manual π β this is the page for struct hih6130, and honestly? it's giving device specific data for the HIH-6130. that's it, that's the vibe. π
πΈ NAME πΈ
struct hih6130 β HIH-6130 device specific data π¦
like literally just the little bundle of state that belongs to one HIH-6130 sensor. no cap.
β¨ SYNOPSIS β¨
bestie. here's the whole struct, character for character, don't @ me:
struct hih6130 {
struct i2c_client *client;
struct mutex lock;
bool valid;
unsigned long last_update;
int temperature;
int humidity;
size_t write_length;
};
π Members π
okay so let's meet the cast, main character energy only:
clientβ pointer to the I2C client device π like who this sensor actually is on the bus.lockβ a mutex to protect the measurement values π keep your hands off the cached numbers while someone's updating them, k?validβ onlyfalsebefore the first measurement is taken π± so it starts off not-valid and then it's valid forever after, periodt.last_updateβ time of last update (in jiffies) β° that's the kernel's cute little tick counter, iykyk.temperatureβ cached temperature measurement value π‘οΈ cached!! it's keeping the last reading around.humidityβ cached humidity measurement value π§ same deal, just wetter.write_lengthβ length for the I2C measurement request π that's how many bytes get written when asking the sensor for a reading.
π«Ά SEE ALSO π«Ά
go read these next, fr fr:
- Kernel file
./drivers/hwmon/hih6130.cπ hih6130_temp_ticks_to_millicelsius(9),hih6130_rh_ticks_to_per_cent_mille(9),hih6130_update_measurements(9),hih6130_temperature_show(9),hih6130_humidity_show(9)
π friendly reminder: this is a driver-internal struct, bestie β the fields are shared state andlockis there for a reason. don't be out here readingtemperatureorhumiditywithout holding it.
anyway that's the whole page, mwah π it lives over in ./drivers/hwmon and the version on this one is dated October 2026 β slay, go touch some sensor data πβπ§
π¦ 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