On Mon, Feb 17, 2025 at 04:03:35PM +0200, Svyatoslav Ryhel wrote: > AL3000a is a simple I2C-based ambient light sensor, which is > closely related to AL3010 and AL3320a, but has significantly > different way of processing data generated by the sensor. LGTM, FWIW, Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> ... > +static void al3000a_set_pwr_off(void *_data) > +{ > + struct al3000a_data *data = _data; > + struct device *dev = regmap_get_device(data->regmap); > + int ret; > + > + ret = regmap_write(data->regmap, AL3000A_REG_SYSTEM, AL3000A_CONFIG_DISABLE); > + if (ret) > + dev_err(dev, "failed to write system register\n"); > + > + ret = regulator_disable(data->vdd_supply); > + if (ret) > + dev_err(dev, "failed to disable vdd power supply\n"); I dunno what we can do on errors, but at least user will be informed what was failed. > +} -- With Best Regards, Andy Shevchenko