[PATCH 2/4] iio: light: tsl2591: add I2C device ID table
From: Jan Remes
Date: Tue Oct 13 2026 - 14:07:26 EST
From: Jan Remes <jan.remes@xxxxxxxxxxxxxxx>
The TSL2591 has only the device-tree matching table, so it cannot be
probed on a kernel with CONFIG_OF disabled.
Add I2C device ID table so that the sensor can be probed.
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..d9c94ca5aa26 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[] = {
+ { "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