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