tsllux(4) - NetBSD Manual Pages

Command: Section: Arch: Collection:  
TSLLUX(4)               NetBSD Kernel Interfaces Manual              TSLLUX(4)


NAME
tsllux -- Taos TSL256x Light-to-Digital Converter
SYNOPSIS
tsllux* at iic? addr 0x29 flags 0x0 tsllux* at iic? addr 0x39 flags 0x0 tsllux* at iic? addr 0x49 flags 0x0
DESCRIPTION
The 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) vari- able; see below. The tsllux driver exports some sysctl(8) variables to control the behav- ior of the sensor and driver: hw.tsllux0.cs_package (boolean, read-write) This variable indicates if the driver instance has been configured to use the coeffecients appropriate for the `CS' package variant. hw.tsllux0.auto_gain (boolean, read-write) This variable indicates if the driver has been configured to use an auto-gain algorithm to improve sensitivity of the sensor while taking care to avoid sensor saturation. Auto-gain is disabled by default. hw.tsllux0.gain (integer, read-write) This variable indicates the selected sensor gain. If auto-gain is enabled, this will reflect the current gain setting selected by the auto-gain algorithm. Otherwise, it reflects the previously-config- ured gain. Valid values are 1 and 16. The default gain is 1. Writ- ing to this variable implicitly disables auto-gain. hw.tsllux0.integration_time (integer, read-write) This variable indicates the selected analog-to-digital converter integration time. Longer integration times correspond to more accu- rate readings, at the cost of more costly read operation. Valid val- ues are 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).
SEE ALSO
envsys(4), iic(4)
HISTORY
The tsllux driver first appeared in NetBSD 9.0.
AUTHORS
The tsllux driver was written by Jason R Thorpe <thorpej@NetBSD.org>.
BUGS
The driver does not currently support the sensor's interrupt features or the sensor's manual integration timing feature. NetBSD 10.99 May 21, 2018 NetBSD 10.99
Powered by man-cgi (2024-03-20). Maintained for NetBSD by Kimmo Suominen. Based on man-cgi by Panagiotis Christias.