Re: [PATCH v3 3/4] iio: light: vl6180: Cleanup als_gain lookup, avoid register readback

2017-09-30 Thread Jonathan Cameron
On Sun, 24 Sep 2017 23:59:19 +0200 Stefan Brüns wrote: > 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 > Applied to the togreg branch of iio.gi

[PATCH v3 3/4] iio: light: vl6180: Cleanup als_gain lookup, avoid register readback

2017-09-24 Thread Stefan Brüns
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 --- Changes in v3: None Changes in v2: - Add missing spaces drivers/iio/light/vl6180.c | 85 +