hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/iio/adc/ti-adc084s021.c
....@@ -1,18 +1,16 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /**
23 * Copyright (C) 2017 Axis Communications AB
34 *
45 * Driver for Texas Instruments' ADC084S021 ADC chip.
56 * Datasheets can be found here:
6
- * http://www.ti.com/lit/ds/symlink/adc084s021.pdf
7
- *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License version 2 as
10
- * published by the Free Software Foundation.
7
+ * https://www.ti.com/lit/ds/symlink/adc084s021.pdf
118 */
129
1310 #include <linux/err.h>
1411 #include <linux/spi/spi.h>
1512 #include <linux/module.h>
13
+#include <linux/mod_devicetable.h>
1614 #include <linux/interrupt.h>
1715 #include <linux/iio/iio.h>
1816 #include <linux/iio/buffer.h>
....@@ -194,8 +192,6 @@
194192
195193 static const struct iio_buffer_setup_ops adc084s021_buffer_setup_ops = {
196194 .preenable = adc084s021_buffer_preenable,
197
- .postenable = iio_triggered_buffer_postenable,
198
- .predisable = iio_triggered_buffer_predisable,
199195 .postdisable = adc084s021_buffer_postdisable,
200196 };
201197
....@@ -218,8 +214,6 @@
218214 spi_set_drvdata(spi, indio_dev);
219215
220216 /* Initiate the Industrial I/O device */
221
- indio_dev->dev.parent = &spi->dev;
222
- indio_dev->dev.of_node = spi->dev.of_node;
223217 indio_dev->name = spi_get_device_id(spi)->name;
224218 indio_dev->modes = INDIO_DIRECT_MODE;
225219 indio_dev->info = &adc084s021_info;
....@@ -265,7 +259,7 @@
265259 static struct spi_driver adc084s021_driver = {
266260 .driver = {
267261 .name = ADC084S021_DRIVER_NAME,
268
- .of_match_table = of_match_ptr(adc084s021_of_match),
262
+ .of_match_table = adc084s021_of_match,
269263 },
270264 .probe = adc084s021_probe,
271265 .id_table = adc084s021_id,