]> git.ipfire.org Git - thirdparty/linux.git/commit
staging: iio: tsl2x7x: convert to use read_avail
authorBrian Masney <masneyb@onstation.org>
Fri, 11 May 2018 00:12:19 +0000 (20:12 -0400)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 12 May 2018 11:19:27 +0000 (12:19 +0100)
commit77b69a0e679b5ca67c5a2b925c195d22dadff12d
tree52fc3251094f89e3fd7bbf8819912fbc5e874e87
parentbfdf7f1024e535eb66250d9ffea30e599e1e5c5a
staging: iio: tsl2x7x: convert to use read_avail

Make the sysfs attributes in_proximity0_calibscale_available, and
in_intensity0_{calibscale,integration_time}_available be created
using info_mask_separate_available on the channel configuration.

The driver assumed that the ALS increment was 2.72 ms, and the upper
range was 696 ms. Some other supported devices use 2.73 ms - 699 ms.
This patch adds support for the multiple ranges.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/staging/iio/light/tsl2x7x.c