TSLLUX(4) | Device Drivers Manual | TSLLUX(4) |
tsllux
—
tsllux* at iic? addr 0x29 flags 0x0
tsllux* at iic? addr 0x39 flags 0x0
tsllux* at iic? addr 0x49 flags 0x0
tsllux
driver provides support for the Taos TSL2560
and TSL2561 light-to-digital converter (ambient light sensor) with the
envsys(4) API.
The TSL2560 is designed to work with SMBus at 100 kHz. The TSL2561
is designed to work with I2C Fast-Mode at 400 kHz. The sensors come in a
variety of packages, including 6-lead Chipscale (CS), 6-lead TMB (T), dual
flat no-lead (FN), and 6-lead ChipLED (CL). The ‘CS’ package
requires a different set of coefficients for calculating the Lux value from
the raw sensor data. This behavior is enabled by specifying the flag
0x1
in the kernel configuration file or by using a
sysctl(8) variable; see
below.
The tsllux
driver exports some
sysctl(8) variables to control
the behavior of the sensor and driver:
1
and 16
. The
default gain is 1
. Writing to this variable
implicitly disables auto-gain.13
(13.7ms), 101
(101ms),
and 402
(402ms). The default value is
101
. Note that that due to the granularity of
sleep timing in the kernel, the tsllux
driver will
busy-wait for wait times less than 1 Hz, and add an additional sleep clock
tick for wait times greater than 1 Hz. See
hz(9).tsllux
driver first appeared in
NetBSD 9.0.
tsllux
driver was written by Jason
R Thorpe
<thorpej@NetBSD.org>.
May 21, 2018 | NetBSD 9.4 |