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