LM75(4)
π LM75(4) π
okay bestie, so this is a page from the Kernel Interfaces Manual and it's literally all about the lm75 driver β no cap. pull up a chair, grab a boba, let's get into it π§β¨
πΈ NAME πΈ
lm75 β the lm75 i2c digital temperature sensor driver, aka the little guy that tells you how hot it is π₯
π SYNOPSIS π
device iic
device iicbus
device lm75
periodt. that's the whole lineup.
β¨ DESCRIPTION β¨
so the lm75 driver gives you access to sensor data and configuration over the iicbus(4). it's giving main character energy on the i2c bus fr fr.
it's also a super easy and simple way to check the functionality of an i2c bus, because it hands you read and write access to the lm75 configuration register. handy π
the access to lm75 data goes through the sysctl(8) interface, and it looks like this:
dev.lm75.0.%desc: LM75 temperature sensor
dev.lm75.0.%driver: lm75
dev.lm75.0.%location: addr=0x49
dev.lm75.0.%pnpinfo: name=lm750 compat=national,lm75
dev.lm75.0.%parent: iicbus3
dev.lm75.0.temperature: 27.1C
dev.lm75.0.thyst: 75.0C
dev.lm75.0.tos: 80.0C
dev.lm75.0.faults: 1
dev.lm75.0.mode: comparator
dev.lm75.0.polarity: active-low
dev.lm75.0.shutdown: 0
and here's what every single one of those lil knobs actually does, bestie:
dev.lm75.%d.temperatureβ this is the read-only value of whatever temperature the sensor is currently reading. no touching, just looking πdev.lm75.%d.thystβ sets the hysteresis temperature. the way this works: once the temp climbs over the overtemperature shutdown value (tos), it then has to drop below the hysteresis temperature before the output (interrupt) pin gets disabled again. so it's the "okay you can chill now" threshold π§dev.lm75.%d.tosβ sets the overtemperature shutdown value. once the temperature gets over this value, the output pin gets enabled. and how that output (interrupt) pin behaves depends on the mode configuration, iykyk.dev.lm75.%d.faultsβ the number of faults that have to happen consecutively before the interrupt (output) pin activates. you can set it to1,2,4, and6. that's it, that's the whole menu.dev.lm75.%d.modeβ sets the operation mode for the sensor interrupt pin. options are'comparator'(which is the default) or'interrupt'. choose wisely bestie.dev.lm75.%d.polarityβ sets the polarity of the sensor interrupt pin. can be'active-low'(the default) or'active-high'. β οΈ but listen: the output pin is an open-drain output, so it needs a proper pull-up resistor to actually work. don't skip that part, it's not optional.dev.lm75.%d.shutdownβ set it to'1'and the sensor shuts down. temperature conversion stops, but the sensor keeps its i2c bus active, meaning you can wake it back up by setting this option to'0'again. it's just napping, not gone π€
please check the lm75 datasheet for more details β that's where the real lore lives π
when you use this together with snmp_lm75(3), you get to monitor lm75 temperature data over SNMP. iconic collab honestly π€
the lm75 driver supports both the low and the high resolution models:
- the low resolution model (
lm75) gives a 9 bit output, with the LSB representing0.5C. - the high resolution model (
lm75a) gives an 11 bit output, with the LSB representing0.125C.
the driver tries to auto-detect which lm75 model you've got, but heads up β the detection of some lm75 clones may not work reliably. so like, don't be shocked if it guesses wrong π
π¦ On a device.hints(5) based system π¦
on a system like MIPS, these values are configurable for lm75:
hint.lm75.%d.atβ this is theiicbus(4)you're attaching to.hint.lm75.%d.addrβ this is the lm75 i2c address on theiicbus(4).
π On a FDT(4) based system π
on a system like ARM, the DTS part for an lm75 device usually looks like this:
i2c {
/* Properties describing the controller appear here. */
...
lm750@49 {
compatible = "national,lm75";
reg = <0x49>;
};
};
where:
compatibleβ should always be set to"national,lm75". no alternatives, no vibes-based substitutions.regβ indicates which 7-bit i2c address the lm75 is wired at. lm75 temperature sensors can be wired to 8 different addresses, which means you can have up to 8 sensors on the sameiicbus(4). squad goals honestly π
π SEE ALSO π
snmp_lm75(3), fdt(4), iic(4), iicbus(4), sysctl(8)
β HISTORY β
the lm75 driver first appeared in FreeBSD 11.0. throwback era π«Ά
π AUTHORS π
the lm75 driver and this manual page were written by Luiz Otavio O Souza <loos@FreeBSD.org>. thank you for your service, king π
and that's the whole page, bestie! this lil slice of Debian manpage lore is dated December 26, 2017, and now you know everything it knows. go forth and read your temperatures π‘οΈβ¨ mwah π
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 2014 Luiz Otavio O Souza <loos@freebsd.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms