iio: temperature: tsys01: Add OF match table
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Tue, 13 Jun 2017 15:52:22 +0000 (21:22 +0530)
committerJonathan Cameron <jic23@kernel.org>
Sat, 1 Jul 2017 09:16:42 +0000 (10:16 +0100)
Add of_match_table for Measurement Specialties TSYS01 temperature sensor

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/temperature/tsys01.c

index 3e60c6189d98b8d30d1f4d4c32186eeae1e62276..d8aa211d76e42cb543a82b91eac9acffec6c6e4a 100644 (file)
@@ -214,11 +214,18 @@ static const struct i2c_device_id tsys01_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, tsys01_id);
 
+static const struct of_device_id tsys01_of_match[] = {
+       { .compatible = "meas,tsys01", },
+       { },
+};
+MODULE_DEVICE_TABLE(of, tsys01_of_match);
+
 static struct i2c_driver tsys01_driver = {
        .probe = tsys01_i2c_probe,
        .id_table = tsys01_id,
        .driver = {
                   .name = "tsys01",
+                  .of_match_table = of_match_ptr(tsys01_of_match),
                   },
 };