.. | .. |
---|
6 | 6 | */ |
---|
7 | 7 | #include <linux/acpi.h> |
---|
8 | 8 | #include <linux/module.h> |
---|
| 9 | +#include <linux/of.h> |
---|
9 | 10 | #include <linux/regmap.h> |
---|
10 | 11 | #include <linux/spi/spi.h> |
---|
11 | 12 | |
---|
.. | .. |
---|
151 | 152 | }; |
---|
152 | 153 | MODULE_DEVICE_TABLE(acpi, bme680_acpi_match); |
---|
153 | 154 | |
---|
| 155 | +static const struct of_device_id bme680_of_spi_match[] = { |
---|
| 156 | + { .compatible = "bosch,bme680", }, |
---|
| 157 | + {}, |
---|
| 158 | +}; |
---|
| 159 | +MODULE_DEVICE_TABLE(of, bme680_of_spi_match); |
---|
| 160 | + |
---|
154 | 161 | static struct spi_driver bme680_spi_driver = { |
---|
155 | 162 | .driver = { |
---|
156 | 163 | .name = "bme680_spi", |
---|
157 | 164 | .acpi_match_table = ACPI_PTR(bme680_acpi_match), |
---|
| 165 | + .of_match_table = bme680_of_spi_match, |
---|
158 | 166 | }, |
---|
159 | 167 | .probe = bme680_spi_probe, |
---|
160 | 168 | .id_table = bme680_spi_id, |
---|