]> git.baikalelectronics.ru Git - kernel.git/commitdiff
iio: chemical: Add OF match table for CCS811 VOC sensor
authorManivannan Sadhasivam <mani@kernel.org>
Tue, 14 Apr 2020 18:49:30 +0000 (00:19 +0530)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 3 May 2020 08:47:18 +0000 (09:47 +0100)
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>
drivers/iio/chemical/ccs811.c

index 1500e4b0dfbd102b9b453b32218f038310dd64d0..3ecd633f9ed3261a2d51233b55d01156e1ab4e0f 100644 (file)
@@ -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,