xref: /freebsd/share/man/man4/isl.4 (revision 6829dae12bb055451fa467da4589c43bd03b1e64)
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.\" $FreeBSD$
26.\"
27.Dd December 18, 2018
28.Dt ISL 4
29.Os
30.Sh NAME
31.Nm isl
32.Nd Intersil(TM) I2C ISL29018 sensor driver
33.Sh SYNOPSIS
34To compile this driver into the kernel, place the following lines into
35the kernel configuration file:
36.Bd -ragged -offset indent
37.Cd "device isl"
38.Cd "device ig4"
39.Cd "device iicbus"
40.Ed
41.Pp
42Alternatively, to load the driver as a module at boot time, place the following line in
43.Xr loader.conf 5 :
44.Bd -literal -offset indent
45isl_load="YES"
46ig4_load="YES"
47.Ed
48.Pp
49On many Chromebook models this driver can be automatically configured with the
50help of the
51.Xr chromebook_platform 4
52driver.
53Alternatively, the
54.Nm
55driver can be manually configured in
56.Pa /boot/device.hints :
57.Cd hint.isl.0.at="iicbus0"
58.Cd hint.isl.0.addr="0x88"
59.Cd hint.isl.1.at="iicbus1"
60.Cd hint.isl.1.addr="0x88"
61.Sh DESCRIPTION
62The
63.Nm
64driver provides access to sensor data provided by the Intersil(TM) I2C
65ISL29018 Digital Ambient Light Sensor and Proximity Sensor with Interrupt
66Function.
67Functionality is basic and provided through the
68.Xr sysctl 8
69interface.
70.Pp
71On a system using
72.Xr device.hints 5 ,
73these values are configurable for
74.Nm :
75.Bl -tag -width "hint.isl.%d.addr"
76.It Va hint.isl.%d.at
77target
78.Xr iicbus 4 .
79.It Va hint.isl.%d.addr
80.Nm
81i2c address on the
82.Xr iicbus 4 .
83.El
84.Sh SYSCTL VARIABLES
85The following
86.Xr sysctl 8
87variables are available:
88.Bl -tag -width "dev.isl.X.resolution"
89.It Va dev.isl.X.als
90Current ALS (Ambient Light Sensor) readout.
91.It Va dev.isl.X.ir
92Current IR (InfraRed) sensor readout.
93.It Va dev.isl.X.prox
94Current proximity sensor readout.
95.It Va dev.isl.X.resolution
96Current sensor resolution.
97.It Va dev.isl.X.range
98Current sensor range.
99.El
100.Sh EXAMPLES
101.Ss Ambient light sensor read out
102.Bd -literal
103$ sysctl dev.isl.0.als
104dev.isl.0.als: 64
105.Ed
106.Ss Automatically adjust brightness
107This requires the port
108.Pa graphics/intel-backlight
109and only works with laptops using a supported Intel(R) GPU.
110.Bd -literal
111$ pkg install intel-backlight
112$ sh /usr/local/share/examples/intel-backlight/isl_backlight.sh
113.Ed
114.Sh SEE ALSO
115.Xr chromebook_platform 4 ,
116.Xr ig4 4 ,
117.Xr iicbus 4
118.Sh AUTHORS
119.An -nosplit
120The
121.Nm
122driver was written by
123.An Michael Gmelin Aq Mt freebsd@grem.de .
124.Pp
125This manual page was written by
126.An Michael Gmelin Aq Mt freebsd@grem.de .
127.Sh BUGS
128The
129.Nm
130driver detects the device based from the I2C address.
131This might have unforeseen consequences if the initialization sequence
132is sent to an unknown device at that address.
133