Re: [PATCH v4 2/2] iio: light: veml3328: add support for new device

From: Javier Carrasco

Date: Sun May 31 2026 - 15:27:07 EST


Hi Joshua,

Just a nitpick I caught on the fly because it was missing in a driver I
recently sent as well.

On Sun May 31, 2026 at 6:56 PM CEST, Joshua Crofts wrote:
> Add support for the Vishay VEML3328 RGB/IR light sensor communicating
> via I2C (SMBus compatible).
>
> Also add a new entry for said driver into Kconfig and Makefile.
>
> Assisted-by: Gemini:3.1-Pro
> Signed-off-by: Joshua Crofts <joshua.crofts1@xxxxxxxxx>
> ---
> MAINTAINERS | 5 +
> drivers/iio/light/Kconfig | 11 ++
> drivers/iio/light/Makefile | 1 +
> drivers/iio/light/veml3328.c | 422 +++++++++++++++++++++++++++++++++++++++++++
> 4 files changed, 439 insertions(+)
>
> +++ b/drivers/iio/light/veml3328.c
> @@ -0,0 +1,422 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Vishay VEML3328 RGBCIR light sensor driver
> + *
> + * Copyright (c) 2026 Joshua Crofts <joshua.crofts1@xxxxxxxxx>
> + *
> + * Datasheet: https://www.vishay.com/docs/84968/veml3328.pdf
> + */
> +
> +#include <linux/array_size.h>
> +#include <linux/bitfield.h>
> +#include <linux/bits.h>
> +#include <linux/cleanup.h>
> +#include <linux/delay.h>
> +#include <linux/err.h>
> +#include <linux/i2c.h>
> +#include <linux/module.h>

At least linux/mod_devicetable.h is missing to include of_device_id.
Probably that's the only missing header, and it could be added without
sending a new version, but that is not for me to decide :)

> +#include <linux/mutex.h>
> +#include <linux/pm_runtime.h>
> +#include <linux/regmap.h>
> +#include <linux/regulator/consumer.h>
> +#include <linux/time.h>
> +#include <linux/types.h>
> +
> +#include <linux/iio/iio.h>
> +

Best regards,
Javier