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: adxl372_i2c: Add OF device ID table

The driver does not have a struct of_device_id table, but supported
devices are registered via Device Trees. This patch adds OF device ID
table.

Signed-off-by: Stefan Popa <stefan.popa@analog.com>
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Stefan Popa and committed by
Jonathan Cameron
5579db2c 9b3b3b28

+8
+8
drivers/iio/accel/adxl372_i2c.c
··· 6 6 */ 7 7 8 8 #include <linux/i2c.h> 9 + #include <linux/mod_devicetable.h> 9 10 #include <linux/module.h> 10 11 #include <linux/regmap.h> 11 12 ··· 47 46 }; 48 47 MODULE_DEVICE_TABLE(i2c, adxl372_i2c_id); 49 48 49 + static const struct of_device_id adxl372_of_match[] = { 50 + { .compatible = "adi,adxl372" }, 51 + { } 52 + }; 53 + MODULE_DEVICE_TABLE(of, adxl372_of_match); 54 + 50 55 static struct i2c_driver adxl372_i2c_driver = { 51 56 .driver = { 52 57 .name = "adxl372_i2c", 58 + .of_match_table = adxl372_of_match, 53 59 }, 54 60 .probe = adxl372_i2c_probe, 55 61 .id_table = adxl372_i2c_id,