Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <raskar.shree97@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Shrikant Raskar and committed by
Jonathan Cameron
a7500888 e4d0e63e

+7
+7
drivers/iio/proximity/rfd77402.c
··· 313 313 }; 314 314 MODULE_DEVICE_TABLE(i2c, rfd77402_id); 315 315 316 + static const struct of_device_id rfd77402_of_match[] = { 317 + { .compatible = "rfdigital,rfd77402" }, 318 + { } 319 + }; 320 + MODULE_DEVICE_TABLE(of, rfd77402_of_match); 321 + 316 322 static struct i2c_driver rfd77402_driver = { 317 323 .driver = { 318 324 .name = RFD77402_DRV_NAME, 319 325 .pm = pm_sleep_ptr(&rfd77402_pm_ops), 326 + .of_match_table = rfd77402_of_match, 320 327 }, 321 328 .probe = rfd77402_probe, 322 329 .id_table = rfd77402_id,