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

2017-09-19 Thread Peter Meerwald-Stadler
> 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. nitpick below > Signed-off-by: Stefan Brüns > --- > drivers/iio/light/vl6180.c | 85 >

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

2017-09-19 Thread Peter Meerwald-Stadler
> 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. nitpick below > Signed-off-by: Stefan Brüns > --- > drivers/iio/light/vl6180.c | 85 >

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

2017-09-18 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 --- drivers/iio/light/vl6180.c | 85

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

2017-09-18 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 --- drivers/iio/light/vl6180.c | 85 -- 1 file changed, 44