forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/drivers/iio/dac/ad5592r.c
....@@ -1,19 +1,17 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * AD5592R Digital <-> Analog converters driver
34 *
45 * Copyright 2015-2016 Analog Devices Inc.
56 * Author: Paul Cercueil <paul.cercueil@analog.com>
6
- *
7
- * Licensed under the GPL-2.
87 */
98
109 #include "ad5592r-base.h"
1110
1211 #include <linux/bitops.h>
1312 #include <linux/module.h>
14
-#include <linux/of.h>
13
+#include <linux/mod_devicetable.h>
1514 #include <linux/spi/spi.h>
16
-#include <linux/acpi.h>
1715
1816 #define AD5592R_GPIO_READBACK_EN BIT(10)
1917 #define AD5592R_LDAC_READBACK_EN BIT(6)
....@@ -99,7 +97,7 @@
9997 return 0;
10098 }
10199
102
-static int ad5593r_gpio_read(struct ad5592r_state *st, u8 *value)
100
+static int ad5592r_gpio_read(struct ad5592r_state *st, u8 *value)
103101 {
104102 int ret;
105103
....@@ -122,7 +120,7 @@
122120 .read_adc = ad5592r_read_adc,
123121 .reg_write = ad5592r_reg_write,
124122 .reg_read = ad5592r_reg_read,
125
- .gpio_read = ad5593r_gpio_read,
123
+ .gpio_read = ad5592r_gpio_read,
126124 };
127125
128126 static int ad5592r_spi_probe(struct spi_device *spi)
....@@ -158,8 +156,8 @@
158156 static struct spi_driver ad5592r_spi_driver = {
159157 .driver = {
160158 .name = "ad5592r",
161
- .of_match_table = of_match_ptr(ad5592r_of_match),
162
- .acpi_match_table = ACPI_PTR(ad5592r_acpi_match),
159
+ .of_match_table = ad5592r_of_match,
160
+ .acpi_match_table = ad5592r_acpi_match,
163161 },
164162 .probe = ad5592r_spi_probe,
165163 .remove = ad5592r_spi_remove,