xref: /freebsd/share/man/man4/isl.4 (revision 397e83df75e0fcd0d3fcb95ae4d794cb7600fc89)
1.\" Copyright (c) 2015 Michael Gmelin <freebsd@grem.de>
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.Dd December 18, 2018
26.Dt ISL 4
27.Os
28.Sh NAME
29.Nm isl
30.Nd Intersil(TM) I2C ISL29018 sensor driver
31.Sh SYNOPSIS
32To compile this driver into the kernel, place the following lines into
33the kernel configuration file:
34.Bd -ragged -offset indent
35.Cd "device isl"
36.Cd "device ig4"
37.Cd "device iicbus"
38.Ed
39.Pp
40Alternatively, to load the driver as a module at boot time, place the following line in
41.Xr loader.conf 5 :
42.Bd -literal -offset indent
43isl_load="YES"
44ig4_load="YES"
45.Ed
46.Pp
47On many Chromebook models this driver can be automatically configured with the
48help of the
49.Xr chromebook_platform 4
50driver.
51Alternatively, the
52.Nm
53driver can be manually configured in
54.Pa /boot/device.hints :
55.Cd hint.isl.0.at="iicbus0"
56.Cd hint.isl.0.addr="0x88"
57.Cd hint.isl.1.at="iicbus1"
58.Cd hint.isl.1.addr="0x88"
59.Sh DESCRIPTION
60The
61.Nm
62driver provides access to sensor data provided by the Intersil(TM) I2C
63ISL29018 Digital Ambient Light Sensor and Proximity Sensor with Interrupt
64Function.
65Functionality is basic and provided through the
66.Xr sysctl 8
67interface.
68.Pp
69On a system using
70.Xr device.hints 5 ,
71these values are configurable for
72.Nm :
73.Bl -tag -width "hint.isl.%d.addr"
74.It Va hint.isl.%d.at
75target
76.Xr iicbus 4 .
77.It Va hint.isl.%d.addr
78.Nm
79i2c address on the
80.Xr iicbus 4 .
81.El
82.Sh SYSCTL VARIABLES
83The following
84.Xr sysctl 8
85variables are available:
86.Bl -tag -width "dev.isl.X.resolution"
87.It Va dev.isl.X.als
88Current ALS (Ambient Light Sensor) readout.
89.It Va dev.isl.X.ir
90Current IR (InfraRed) sensor readout.
91.It Va dev.isl.X.prox
92Current proximity sensor readout.
93.It Va dev.isl.X.resolution
94Current sensor resolution.
95.It Va dev.isl.X.range
96Current sensor range.
97.El
98.Sh EXAMPLES
99.Ss Ambient light sensor read out
100.Bd -literal
101$ sysctl dev.isl.0.als
102dev.isl.0.als: 64
103.Ed
104.Ss Automatically adjust brightness
105This requires the port
106.Pa graphics/intel-backlight
107and only works with laptops using a supported Intel(R) GPU.
108.Bd -literal
109$ pkg install intel-backlight
110$ sh /usr/local/share/examples/intel-backlight/isl_backlight.sh
111.Ed
112.Sh SEE ALSO
113.Xr chromebook_platform 4 ,
114.Xr ig4 4 ,
115.Xr iicbus 4
116.Sh AUTHORS
117.An -nosplit
118The
119.Nm
120driver was written by
121.An Michael Gmelin Aq Mt freebsd@grem.de .
122.Pp
123This manual page was written by
124.An Michael Gmelin Aq Mt freebsd@grem.de .
125.Sh BUGS
126The
127.Nm
128driver detects the device based from the I2C address.
129This might have unforeseen consequences if the initialization sequence
130is sent to an unknown device at that address.
131