Stefan Brüns e794bf6751 iio: light: vl6180: Cleanup als_gain lookup, avoid register readback
Instead of manually iterating the array of allowed gain values, use
find_closest. Storing the current gain setting avoids accessing the
hardware on each query.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-10-09 20:50:15 +01:00
..
2017-10-09 09:02:35 +02:00
2017-10-09 20:49:39 +01:00
2017-10-09 09:02:35 +02:00
2017-10-09 09:02:35 +02:00