> Hi, > > > > > +static int ltr390_set_mode(struct ltr390_data *data, enum ltr390_mode mode) > > +{ > > + if (data->mode == mode) > > + return 0; > > + > > + switch (mode) { > > + case LTR390_SET_ALS_MODE: > > + regmap_clear_bits(data->regmap, LTR390_MAIN_CTRL, LTR390_UVS_MODE); > > Should this be: > ret = regmap_clear_bits(); > if (ret) > return ret; > ? > > Otherwise, 0 is returned in all cases and ltr390_read_raw() could be > simplified. > > > + break; > > + > > + case LTR390_SET_UVS_MODE: > > + regmap_set_bits(data->regmap, LTR390_MAIN_CTRL, LTR390_UVS_MODE); > > Same. > Yeah, I totally missed this. I will make the change and send a v7. Thank you for pointing it out.