Re: [PATCH 2/2] iio: light: veml6030: fix scale to conform to ABI
From: Jonathan Cameron
Date: Sun Jan 12 2025 - 08:22:34 EST
On Tue, 07 Jan 2025 21:50:22 +0100
Javier Carrasco <javier.carrasco.cruz@xxxxxxxxx> wrote:
> The current scale is not ABI-compliant as it is just the sensor gain
> instead of the value that acts as a multiplier to be applied to the raw
> value (there is no offset).
>
> Use the iio-gts helpers to obtain the proper scale values according to
> the gain and integration time to match the resolution tables from the
> datasheet and drop dedicated variables to store the current values of
> the integration time, gain and resolution. When at it, use 'scale'
> instead of 'gain' consistently for the get/set functions to avoid
> misunderstandings.
>
> Fixes: 7b779f573c48 ("iio: light: add driver for veml6030 ambient light sensor")
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@xxxxxxxxx>
For iio-gts useage please +CC Matti.
Matti is far more likely to spot subtle issues around that than other
reviewers such as me :) Obviously that depends on Matti having time!
To me this looks fine
Jonathan