aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/humidity
diff options
context:
space:
mode:
authorMichael Stecklein <m-stecklein@ti.com>2017-06-19 11:01:06 -0500
committerJonathan Cameron <jic23@kernel.org>2017-07-01 10:16:38 +0100
commita2d80de873de0a01c14aae4d85c5558be23c42d1 (patch)
tree5b3320fe63ffb028b45f495e4ff94a24c320bec4 /drivers/iio/humidity
parentiio: humidity: hdc100x: document compatible HDC10xx devices (diff)
downloadlinux-dev-a2d80de873de0a01c14aae4d85c5558be23c42d1.tar.xz
linux-dev-a2d80de873de0a01c14aae4d85c5558be23c42d1.zip
iio: humidity: hdc100x: add match table and device id's
Add of_match_table and point it to a list of compatible device tree device id's. Signed-off-by: Michael Stecklein <m-stecklein@ti.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/humidity')
-rw-r--r--drivers/iio/humidity/hdc100x.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/iio/humidity/hdc100x.c b/drivers/iio/humidity/hdc100x.c
index 6778bc73d5c4..7851bd90ef64 100644
--- a/drivers/iio/humidity/hdc100x.c
+++ b/drivers/iio/humidity/hdc100x.c
@@ -429,9 +429,20 @@ static const struct i2c_device_id hdc100x_id[] = {
};
MODULE_DEVICE_TABLE(i2c, hdc100x_id);
+static const struct of_device_id hdc100x_dt_ids[] = {
+ { .compatible = "ti,hdc1000" },
+ { .compatible = "ti,hdc1008" },
+ { .compatible = "ti,hdc1010" },
+ { .compatible = "ti,hdc1050" },
+ { .compatible = "ti,hdc1080" },
+ { }
+};
+MODULE_DEVICE_TABLE(of, hdc100x_dt_ids);
+
static struct i2c_driver hdc100x_driver = {
.driver = {
.name = "hdc100x",
+ .of_match_table = of_match_ptr(hdc100x_dt_ids),
},
.probe = hdc100x_probe,
.remove = hdc100x_remove,