diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2021-03-17 00:40:12 -0700 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2021-03-25 19:13:52 +0000 |
commit | 24b84444eb6f8d6a5090f6fdf172cacfa43f89e9 (patch) | |
tree | 6217c3f8a2b09108b63bd1e6b0dee42b79be69df /tools/build | |
parent | ddaf14dab78c915b52f6c359b3f00ef3b97bccf6 (diff) |
iio: acpi_als: Add trigger support
As some firmware does not notify on illuminance changes, add a
trigger to be able to query light via software (sysfs-trigger or
hrtrigger).
Add a hardware trigger set as the default trigger to maintain backward
compatibility.
Check iio_info reports the sensor as buffer capable:
iio:device0: acpi-als (buffer capable)
To test, check we can get data on demand on an Intel based chromebook:
IIO_DEV="iio:device0"
echo 1 > iio_sysfs_trigger/add_trigger
cat trigger2/name > ${IIO_DEV}/trigger/current_trigger
for i in ${IIO_DEV}/scan_elements/*_en ${IIO_DEV}/buffer/enable ; do
echo 1 > $i
done
od -x /dev/${IIO_DEV} &
echo 1 > trigger2/trigger_now
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20210317074012.2336454-4-gwendal@chromium.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'tools/build')
0 files changed, 0 insertions, 0 deletions