xref: /freebsd/share/man/man4/max44009.4 (revision 43a5ec4eb41567cc92586503212743d89686d78f)
1.\"
2.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3.\"
4.\" Copyright (c) 2020 Andriy Gapon <avg@FreeBSD.org>
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25.\" SUCH DAMAGE.
26.\"
27.\" $FreeBSD$
28.\"
29.Dd November 6, 2021
30.Dt MAX44009 4
31.Os
32.Sh NAME
33.Nm max44009
34.Nd driver for MAX44009 Ambient Light Sensor
35.Sh SYNOPSIS
36To compile this driver into the kernel,
37place the following lines in your
38kernel configuration file:
39.Bd -ragged -offset indent
40.Cd "device max44009"
41.Cd "device iicbus"
42.Ed
43.Pp
44Alternatively, to load the driver as a
45module at boot time, place the following line in
46.Xr loader.conf 5 :
47.Bd -literal -offset indent
48max44009_load="YES"
49.Ed
50.Sh DESCRIPTION
51The
52.Nm
53driver reports illuminance data from MAX44009 Ambient Light Sensor.
54.Pp
55The
56.Nm
57driver reports data via
58.Xr sysctl 8
59entry in the device's node in the
60.Xr sysctl 8
61tree:
62.Bl -tag -width illuminance
63.It Va illuminance
64The illuminance, in lux units.
65.El
66.Pp
67On an
68.Xr FDT 4
69based system the following properties must be set:
70.Bl -tag -width "compatible"
71.It Va compatible
72Must be set to
73.Qq maxim,max44009 .
74.It Va reg
75The I2C address of
76.Nm
77which can be either 0x4a or 0x4b.
78.El
79.Sh SEE ALSO
80.Xr fdt 4 ,
81.Xr iicbus 4 ,
82.Xr sysctl 8
83.Sh HISTORY
84The
85.Nm
86driver and this manual page was written by
87.An Andriy Gapon Aq Mt avg@FreeBSD.org .
88.Sh BUGS
89The
90.Nm
91driver does not support illuminance thresholds and the corresponding
92interrupt.
93