Re: [PATCH v2 4/4] iio: light: add support for veml6031x00 ALS series

From: Andy Shevchenko

Date: Wed May 13 2026 - 16:08:40 EST


On Thu, May 14, 2026 at 07:23:10AM +1300, Javier Carrasco wrote:
> On Thu May 14, 2026 at 5:56 AM +13, Andy Shevchenko wrote:
> > On Wed, May 13, 2026 at 05:49:44PM +1300, Javier Carrasco wrote:
> >> These sensors provide two light channels (ALS and IR), I2C communication
> >> and a multiplexed interrupt line to signal data ready and configurable
> >> threshold alarms.
> >
> > Can you split this to two or more patches:
> > - basic functionality
> > - feature 1 (exempli gratia, IR)
> > - feature 2 (exempli gratia, multiplexed interrupt)
> > - ...
> >
> > ?

> Yes, I can. I will wait for more feedback before proceeding.

Sure, with a driver like this the recommended time between the sequential
versions is about 1 week.

> > But let's wait for Sashiko if it swallows this big slice of the pie
> > and not choke on it.

Also note that in IIO we expect ~750 lines per patch with rare exceptions.
~1300 is almost double of this, so the split I am sure is desirable.

...

> > Oh, is 'x' is a real letter in the part number or a wildcard? If the latter,
> > please avoid. Choose the base part number instead.
>
> I mentioned that in the cover letter: the x belongs to the names in the
> datasheets and every part number.

Ah, I missed that. Thanks for confirming.

...

> >> +static const struct i2c_device_id veml6031x00_id[] = {
> >> + { "veml6031x00", (kernel_ulong_t)&veml6031x00_chip },
> >> + { "veml6031x01", (kernel_ulong_t)&veml6031x01_chip },
> >> + { "veml60311x00", (kernel_ulong_t)&veml60311x00_chip },
> >> + { "veml60311x01", (kernel_ulong_t)&veml60311x01_chip },
> >> + { }
> >> +};
> >
> > Perhaps use C99 initialisers, as there is an activity to change all drivers to
> > follow that. Jonathan, btw, what do you think we should do in the light of Uwe's
> > approach? Require C99 initialisers in new code, or something else?
>
> I will account for that in v3 alongside any other suggestions that might
> still arise, thank you.

At least C99 initialisers make code robust, independently on the decision it
might be good to go with them, the only question here is more administrative
(if we want this to be already a requirement for a new code in IIO or not...
yet).

--
With Best Regards,
Andy Shevchenko