@@ -811,6 +810,14 @@ static int ssm2518_i2c_remove(struct i2c_client *client)
return 0;
}
+#ifdef CONFIG_OF
+static const struct of_device_id ssm2518_dt_ids[] = {
+ { .compatible = "adi,ssm2518", },
+ { }
+};
+MODULE_DEVICE_TABLE(of, ssm2518_dt_ids);
+#endif
+
static const struct i2c_device_id ssm2518_i2c_ids[] = {
{ "ssm2518", 0 },
{ }
@@ -821,6 +828,9 @@ static struct i2c_driver ssm2518_driver = {
.driver = {
.name = "ssm2518",
.owner = THIS_MODULE,
+#ifdef CONFIG_OF
+ .of_match_table = of_match_ptr(ssm2518_dt_ids),
+#endif
},
.probe = ssm2518_i2c_probe,
.remove = ssm2518_i2c_remove,