1.\" 2.\" SPDX-License-Identifier: BSD-2-Clause 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.Dd November 6, 2021 28.Dt MAX44009 4 29.Os 30.Sh NAME 31.Nm max44009 32.Nd driver for MAX44009 Ambient Light Sensor 33.Sh SYNOPSIS 34To compile this driver into the kernel, 35place the following lines in your 36kernel configuration file: 37.Bd -ragged -offset indent 38.Cd "device max44009" 39.Cd "device iicbus" 40.Ed 41.Pp 42Alternatively, to load the driver as a 43module at boot time, place the following line in 44.Xr loader.conf 5 : 45.Bd -literal -offset indent 46max44009_load="YES" 47.Ed 48.Sh DESCRIPTION 49The 50.Nm 51driver reports illuminance data from MAX44009 Ambient Light Sensor. 52.Pp 53The 54.Nm 55driver reports data via 56.Xr sysctl 8 57entry in the device's node in the 58.Xr sysctl 8 59tree: 60.Bl -tag -width illuminance 61.It Va illuminance 62The illuminance, in lux units. 63.El 64.Pp 65On an 66.Xr FDT 4 67based system the following properties must be set: 68.Bl -tag -width "compatible" 69.It Va compatible 70Must be set to 71.Qq maxim,max44009 . 72.It Va reg 73The I2C address of 74.Nm 75which can be either 0x4a or 0x4b. 76.El 77.Sh SEE ALSO 78.Xr fdt 4 , 79.Xr iicbus 4 , 80.Xr sysctl 8 81.Sh HISTORY 82The 83.Nm 84driver and this manual page was written by 85.An Andriy Gapon Aq Mt avg@FreeBSD.org . 86.Sh BUGS 87The 88.Nm 89driver does not support illuminance thresholds and the corresponding 90interrupt. 91