Skip to content
Commit e794bf67 authored by Stefan Brüns's avatar Stefan Brüns Committed by Jonathan Cameron
Browse files

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: default avatarStefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent df698c04
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment