diff options
author | Sebastien Bourdelin <sebastien.bourdelin@gmail.com> | 2019-01-14 15:19:13 -0500 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2019-01-19 17:41:35 +0000 |
commit | f7da884578212f10fd200e48f4e4c56f78e513d6 (patch) | |
tree | 094d6b721fcc63f84e57fdb7cf35a232b0cb5860 /drivers/iio/chemical/bme680_i2c.c | |
parent | e5aab7b0d88db2dbae0ad0dedeba22599576cd22 (diff) |
iio: chemical: bme680: Add device-tree support
This commit allow the driver to work with device-tree.
Signed-off-by: Sebastien Bourdelin <sebastien.bourdelin@gmail.com>
Acked-by: Himanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/chemical/bme680_i2c.c')
-rw-r--r-- | drivers/iio/chemical/bme680_i2c.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/iio/chemical/bme680_i2c.c b/drivers/iio/chemical/bme680_i2c.c index 06d4be539d2e..b2f805b6b36a 100644 --- a/drivers/iio/chemical/bme680_i2c.c +++ b/drivers/iio/chemical/bme680_i2c.c @@ -70,10 +70,17 @@ static const struct acpi_device_id bme680_acpi_match[] = { }; MODULE_DEVICE_TABLE(acpi, bme680_acpi_match); +static const struct of_device_id bme680_of_i2c_match[] = { + { .compatible = "bosch,bme680", }, + {}, +}; +MODULE_DEVICE_TABLE(of, bme680_of_i2c_match); + static struct i2c_driver bme680_i2c_driver = { .driver = { .name = "bme680_i2c", .acpi_match_table = ACPI_PTR(bme680_acpi_match), + .of_match_table = bme680_of_i2c_match, }, .probe = bme680_i2c_probe, .id_table = bme680_i2c_id, |