MCP980X(4)
π MCP980X(4) β like, the manual page, but make it make sense π
(Kernel Interfaces Manual, bestie edition)
okay so you found yourself in section 4 of the Kernel Interfaces Manual and your first thought was "what even is a mcp980x" β valid! Sit down, grab a lil drink π, this is gonna be cute and also fully accurate.
β¨ NAME β¨
mcp980x β the Microchip 9800/1/2/3 I2C temperature sensor driver. yes THAT one. the temp-sensor girly π
β¨ SYNOPSIS β¨
mcp980x* at iic? addr 0x48
that's it. that's the whole vibe. drop it on the iic? bus at addr 0x48 and you're so back π«Ά
β¨ DESCRIPTION β¨
okay so the mcp980x driver is literally here to provide support for the MCP980x series of temperature sensors. that's the whole job, and it ate π₯
it lets you report the ambient temperature through the envsys(4) API β so yeah, your little chip is gonna be spilling the tea about how warm the room is, and envsys is the one relaying it. no cap.
β¨ SYSCTL VARIABLES β¨
the following sysctl(3) variable are provided β yes, that's exactly what it says, we're keeping it, and here they are, all of them, none skipped π:
machdep.mcp980x0.resβ the ADC resolution, and it's an integer. valid values are0-3, where0is 9-bit (0.5Celsius degree) resolution and3is 12-bit (0.0625Celsius degree) resolution. so like, the higher the number, the more granular the tea. icon energy β¨machdep.mcp980x0.templimitβ if the ambient temperature exceeds this limit, the chip asserts an alert line (integer). think of it as a little "bestie it is TOO hot in here" signal ππ₯machdep.mcp980x0.hysteresisβ the hysteresis for the temperature limit (integer). yes it's a real word, yes it's important, we'll get to the caveat about it down below π
β¨ SEE ALSO β¨
β¨ HISTORY β¨
the mcp980x device first appeared in NetBSD 7.0. a legend was born πβ
β¨ AUTHORS β¨
the mcp980x driver was written by Radoslaw Kujawa <radoslaw.kujawa@gmail.com>. give them their flowers ππ
π CAVEATS π
MCP9804andMCP9805chip are different and are supported by thesdtemp(4)driver. so do NOT come formcp980xwith those, they're literally a different breed. π ββοΈ- the MCP980x chip supports hysteresis and temperature limit values with a resolution of
0.5Celsius degree, however themcp980xdriver supports setting only integer values. so like β the hardware can do the half-degree thing, but the driver is out here doing whole numbers only. it's giving "close enough" π but that's just how it is, ngl.
also lowkey:MCP9804/MCP9805βsdtemp(4). if you're looking for those, you're in the wrong group chat, bestie. π¦
and that's the page, fr fr! π this lil beauty came to you from Debian, version vibes stamped July 26, 2016 β yeah she's been around, and she's still serving. periodt. πβ¨
π¦ where this page comes from
- nixpkgs unstable: netbsd-source 11.0
- Copyright (c) 2013 The NetBSD Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms