Re: [PATCH v6 2/3] iio: light: add support for veml6046x00 RGBIR color sensor

From: Andy Shevchenko
Date: Thu Aug 21 2025 - 05:45:41 EST


On Fri, Jul 25, 2025 at 09:32:12AM +0200, Andreas Klinger wrote:
> Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> 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.

OK!

...

> > > + 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.

This is interesting... So it's not 0, nor 0x0000?

--
With Best Regards,
Andy Shevchenko