xref: /netbsd-src/share/man/man4/mcp980x.4 (revision 6944fee265f7e32c9134125f375c66eb5e7c52a0)
1.\" $NetBSD: mcp980x.4,v 1.7 2020/06/14 22:30:44 rkujawa Exp $
2.\"
3.\" Copyright (c) 2013 The NetBSD Foundation, Inc.
4.\" All rights reserved.
5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Radoslaw Kujawa.
8.\"
9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions
11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright
13.\"    notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\"    notice, this list of conditions and the following disclaimer in the
16.\"    documentation and/or other materials provided with the distribution.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE.
29.\"
30.Dd July 26, 2016
31.Dt MCP980X 4
32.Os
33.Sh NAME
34.Nm mcp980x
35.Nd Microchip 9800/1/2/3 I2C temperature sensor driver
36.Sh SYNOPSIS
37.Cd "mcp980x* at iic? addr 0x48"
38.Sh DESCRIPTION
39The
40.Nm
41driver provides support for the MCP980x series of temperature sensors.
42It allows reporting ambient temperature through the
43.Xr envsys 4
44API.
45.Sh SYSCTL VARIABLES
46The following
47.Xr sysctl 3
48variable are provided:
49.Bl -tag -width machdep.mcp980x0.hysteresis
50.It Va machdep.mcp980x0.res
51ADC resolution (integer).
52Valid values are 0-3, where 0 is 9-bit (0.5 Celsius degree) and 3 is 12-bit
53(0.0625 Celsius degree) resolution.
54.It Va machdep.mcp980x0.templimit
55If the ambient temperature exceeds this limit, the chip asserts an alert line
56(integer).
57.It Va machdep.mcp980x0.hysteresis
58Hysteresis for temperature limit (integer).
59.El
60.Sh SEE ALSO
61.Xr envsys 4
62.Sh HISTORY
63The
64.Nm
65device first appeared in
66.Nx 7.0 .
67.Sh AUTHORS
68.An -nosplit
69The
70.Nm
71driver was written by
72.An Radoslaw Kujawa Aq Mt radoslaw.kujawa@gmail.com .
73.Sh CAVEATS
74MCP9804 and MCP9805 chip are different and are supported by the
75.Xr sdtemp 4
76driver.
77.Pp
78The MCP980x chip supports hysteresis and temperature limit values with a
79resolution of 0.5 Celsius degree, however the
80.Nm
81driver supports setting only integer values.
82