summaryrefslogtreecommitdiffstats
path: root/drivers/iio/chemical
diff options
context:
space:
mode:
authorManivannan Sadhasivam <mani@kernel.org>2020-04-15 00:19:30 +0530
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2020-05-03 09:47:18 +0100
commit151e91733a79403119d2ac8f4fe9870e7b4d75ac (patch)
treeb63dfc6f0dc81bbe78b1b03b8d3321aee24af868 /drivers/iio/chemical
parentc6644f7201f3398220f8c84ecc5a9432d51ee89b (diff)
downloadlinux-151e91733a79403119d2ac8f4fe9870e7b4d75ac.tar.bz2
iio: chemical: Add OF match table for CCS811 VOC sensor
Add devicetree OF match table support for CCS811 VOC sensor. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Manivannan Sadhasivam <mani@kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/chemical')
-rw-r--r--drivers/iio/chemical/ccs811.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/iio/chemical/ccs811.c b/drivers/iio/chemical/ccs811.c
index 1500e4b0dfbd..3ecd633f9ed3 100644
--- a/drivers/iio/chemical/ccs811.c
+++ b/drivers/iio/chemical/ccs811.c
@@ -549,9 +549,16 @@ static const struct i2c_device_id ccs811_id[] = {
};
MODULE_DEVICE_TABLE(i2c, ccs811_id);
+static const struct of_device_id ccs811_dt_ids[] = {
+ { .compatible = "ams,ccs811" },
+ { }
+};
+MODULE_DEVICE_TABLE(of, ccs811_dt_ids);
+
static struct i2c_driver ccs811_driver = {
.driver = {
.name = "ccs811",
+ .of_match_table = ccs811_dt_ids,
},
.probe = ccs811_probe,
.remove = ccs811_remove,