From: Shrikant Raskar Date: Thu, 1 Jan 2026 16:17:39 +0000 (+0530) Subject: iio: proximity: rfd77402: Add OF device ID for enumeration via DT X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a750088883da1d21502d26bf5852a0d49efb1604;p=thirdparty%2Fkernel%2Flinux.git iio: proximity: rfd77402: Add OF device ID for enumeration via DT Add an OF device ID table so the driver can bind automatically when the RFD77402 sensor is described in Device Tree. This enables proper enumeration via its compatible string and allows instantiation on DT-based platforms. Signed-off-by: Shrikant Raskar Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/proximity/rfd77402.c b/drivers/iio/proximity/rfd77402.c index aff60a3c1a6f0..3262af6f6882b 100644 --- a/drivers/iio/proximity/rfd77402.c +++ b/drivers/iio/proximity/rfd77402.c @@ -313,10 +313,17 @@ static const struct i2c_device_id rfd77402_id[] = { }; MODULE_DEVICE_TABLE(i2c, rfd77402_id); +static const struct of_device_id rfd77402_of_match[] = { + { .compatible = "rfdigital,rfd77402" }, + { } +}; +MODULE_DEVICE_TABLE(of, rfd77402_of_match); + static struct i2c_driver rfd77402_driver = { .driver = { .name = RFD77402_DRV_NAME, .pm = pm_sleep_ptr(&rfd77402_pm_ops), + .of_match_table = rfd77402_of_match, }, .probe = rfd77402_probe, .id_table = rfd77402_id,