Hi Andy, thanks for the detailed review again. Some comments below. Andy Shevchenko schrieb am Mi, 16. Jul 10:34: > > +#define VEML6046X00_GAIN_1 0x0 > > +#define VEML6046X00_GAIN_2 0x1 > > +#define VEML6046X00_GAIN_0_66 0x2 > > +#define VEML6046X00_GAIN_0_5 0x3 > > Is it defined as hexadecimal in the datasheet? Otherwise use plain decimal > numbers. It's in the datasheet defined exactly the way i did. > > +static int veml6046x00_validate_part_id(struct veml6046x00_data *data) > > +{ > > + struct device *dev = regmap_get_device(data->regmap); > > + unsigned int part_id; > > + int ret; > > + __le16 reg; > > + > > + ret = regmap_bulk_read(data->regmap, VEML6046X00_REG_ID, > > + ®, sizeof(reg)); > > + if (ret) > > + return dev_err_probe(dev, ret, "Failed to read ID\n"); > > + > > + part_id = le16_to_cpu(reg); > > + if (part_id != 0x0001) > > + dev_info(dev, "Unknown ID %#04x\n", part_id); > > For 0 it will print 0 and not 0x0000. Is it okay? I just tried and it prints 0x00 if the part_id is 0. Best regards, Andreas