Message ID | 20240913-veml6035-v1-4-0b09c0c90418@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | iio: light: veml6030: fix issues and add support for veml6035 | expand |
On Fri, 13 Sep 2024 15:18:59 +0200 Javier Carrasco <javier.carrasco.cruz@gmail.com> wrote: > Instead of using regmap_update_bits() and passing val = 1, use > regmap_set_bits(). > Applied but description tweaked as key here is that VEML6030_ALS_SD is 1. If it contained other bits then this change would be wrong. > Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> > --- > drivers/iio/light/veml6030.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/iio/light/veml6030.c b/drivers/iio/light/veml6030.c > index df2ba3078b91..5d4c2e35b987 100644 > --- a/drivers/iio/light/veml6030.c > +++ b/drivers/iio/light/veml6030.c > @@ -149,8 +149,8 @@ static int veml6030_als_pwr_on(struct veml6030_data *data) > > static int veml6030_als_shut_down(struct veml6030_data *data) > { > - return regmap_update_bits(data->regmap, VEML6030_REG_ALS_CONF, > - VEML6030_ALS_SD, 1); > + return regmap_set_bits(data->regmap, VEML6030_REG_ALS_CONF, > + VEML6030_ALS_SD); > } > > static void veml6030_als_shut_down_action(void *data) >
diff --git a/drivers/iio/light/veml6030.c b/drivers/iio/light/veml6030.c index df2ba3078b91..5d4c2e35b987 100644 --- a/drivers/iio/light/veml6030.c +++ b/drivers/iio/light/veml6030.c @@ -149,8 +149,8 @@ static int veml6030_als_pwr_on(struct veml6030_data *data) static int veml6030_als_shut_down(struct veml6030_data *data) { - return regmap_update_bits(data->regmap, VEML6030_REG_ALS_CONF, - VEML6030_ALS_SD, 1); + return regmap_set_bits(data->regmap, VEML6030_REG_ALS_CONF, + VEML6030_ALS_SD); } static void veml6030_als_shut_down_action(void *data)
Instead of using regmap_update_bits() and passing val = 1, use regmap_set_bits(). Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> --- drivers/iio/light/veml6030.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)