[PATCH v4 2/4] iio: light: tsl2591: add I2C device ID table
From: Jan Remes
Date: Thu Oct 22 2026 - 15:04:04 EST
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>
---
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),
--
2.53.0