forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/iio/chemical/bme680_spi.c
....@@ -6,6 +6,7 @@
66 */
77 #include <linux/acpi.h>
88 #include <linux/module.h>
9
+#include <linux/of.h>
910 #include <linux/regmap.h>
1011 #include <linux/spi/spi.h>
1112
....@@ -151,10 +152,17 @@
151152 };
152153 MODULE_DEVICE_TABLE(acpi, bme680_acpi_match);
153154
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
+
154161 static struct spi_driver bme680_spi_driver = {
155162 .driver = {
156163 .name = "bme680_spi",
157164 .acpi_match_table = ACPI_PTR(bme680_acpi_match),
165
+ .of_match_table = bme680_of_spi_match,
158166 },
159167 .probe = bme680_spi_probe,
160168 .id_table = bme680_spi_id,