Re: [PATCH v4 2/4] iio: light: tsl2591: add I2C device ID table

From: Jonathan Cameron

Date: Thu Oct 22 2026 - 23:19:33 EST


On Thu, 22 Oct 2026 20:56:41 +0200
Jan Remes <ciakval@xxxxxxxxx> wrote:

> From: Jan Remes <jan.remes@xxxxxxxxxxxxxxx>
>
> Add an I2C ID table so that driver can match devices assigned via sysfs
> or through board info.
>
> Signed-off-by: Jan Remes <jan.remes@xxxxxxxxxxxxxxx>
This one is independent enough to queue now so applied to the
testing branch of iio.git. I think the other two need to wait for
the fix to work it's way to upstream.

J

> ---
> drivers/iio/light/tsl2591.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/iio/light/tsl2591.c b/drivers/iio/light/tsl2591.c
> index f56d31404c25..8cfce720efb9 100644
> --- a/drivers/iio/light/tsl2591.c
> +++ b/drivers/iio/light/tsl2591.c
> @@ -1149,7 +1149,14 @@ static const struct of_device_id tsl2591_of_match[] = {
> };
> MODULE_DEVICE_TABLE(of, tsl2591_of_match);
>
> +static const struct i2c_device_id tsl2591_id[] = {
> + { .name = "tsl2591" },
> + { }
> +};
> +MODULE_DEVICE_TABLE(i2c, tsl2591_id);
> +
> static struct i2c_driver tsl2591_driver = {
> + .id_table = tsl2591_id,
> .driver = {
> .name = "tsl2591",
> .pm = pm_ptr(&tsl2591_pm_ops),
>