forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/drivers/iio/pressure/bmp280-i2c.c
....@@ -1,7 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 #include <linux/module.h>
23 #include <linux/i2c.h>
3
-#include <linux/acpi.h>
4
-#include <linux/of.h>
54 #include <linux/regmap.h>
65
76 #include "bmp280.h"
....@@ -37,21 +36,6 @@
3736 client->irq);
3837 }
3938
40
-static int bmp280_i2c_remove(struct i2c_client *client)
41
-{
42
- return bmp280_common_remove(&client->dev);
43
-}
44
-
45
-static const struct acpi_device_id bmp280_acpi_i2c_match[] = {
46
- {"BMP0280", BMP280_CHIP_ID },
47
- {"BMP0180", BMP180_CHIP_ID },
48
- {"BMP0085", BMP180_CHIP_ID },
49
- {"BME0280", BME280_CHIP_ID },
50
- { },
51
-};
52
-MODULE_DEVICE_TABLE(acpi, bmp280_acpi_i2c_match);
53
-
54
-#ifdef CONFIG_OF
5539 static const struct of_device_id bmp280_of_i2c_match[] = {
5640 { .compatible = "bosch,bme280", .data = (void *)BME280_CHIP_ID },
5741 { .compatible = "bosch,bmp280", .data = (void *)BMP280_CHIP_ID },
....@@ -60,9 +44,6 @@
6044 { },
6145 };
6246 MODULE_DEVICE_TABLE(of, bmp280_of_i2c_match);
63
-#else
64
-#define bmp280_of_i2c_match NULL
65
-#endif
6647
6748 static const struct i2c_device_id bmp280_i2c_id[] = {
6849 {"bmp280", BMP280_CHIP_ID },
....@@ -76,12 +57,10 @@
7657 static struct i2c_driver bmp280_i2c_driver = {
7758 .driver = {
7859 .name = "bmp280",
79
- .acpi_match_table = ACPI_PTR(bmp280_acpi_i2c_match),
80
- .of_match_table = of_match_ptr(bmp280_of_i2c_match),
60
+ .of_match_table = bmp280_of_i2c_match,
8161 .pm = &bmp280_dev_pm_ops,
8262 },
8363 .probe = bmp280_i2c_probe,
84
- .remove = bmp280_i2c_remove,
8564 .id_table = bmp280_i2c_id,
8665 };
8766 module_i2c_driver(bmp280_i2c_driver);