| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /** |
|---|
| 2 | 3 | * Copyright (C) 2017 Axis Communications AB |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Driver for Texas Instruments' ADC084S021 ADC chip. |
|---|
| 5 | 6 | * 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 |
|---|
| 11 | 8 | */ |
|---|
| 12 | 9 | |
|---|
| 13 | 10 | #include <linux/err.h> |
|---|
| 14 | 11 | #include <linux/spi/spi.h> |
|---|
| 15 | 12 | #include <linux/module.h> |
|---|
| 13 | +#include <linux/mod_devicetable.h> |
|---|
| 16 | 14 | #include <linux/interrupt.h> |
|---|
| 17 | 15 | #include <linux/iio/iio.h> |
|---|
| 18 | 16 | #include <linux/iio/buffer.h> |
|---|
| .. | .. |
|---|
| 194 | 192 | |
|---|
| 195 | 193 | static const struct iio_buffer_setup_ops adc084s021_buffer_setup_ops = { |
|---|
| 196 | 194 | .preenable = adc084s021_buffer_preenable, |
|---|
| 197 | | - .postenable = iio_triggered_buffer_postenable, |
|---|
| 198 | | - .predisable = iio_triggered_buffer_predisable, |
|---|
| 199 | 195 | .postdisable = adc084s021_buffer_postdisable, |
|---|
| 200 | 196 | }; |
|---|
| 201 | 197 | |
|---|
| .. | .. |
|---|
| 218 | 214 | spi_set_drvdata(spi, indio_dev); |
|---|
| 219 | 215 | |
|---|
| 220 | 216 | /* Initiate the Industrial I/O device */ |
|---|
| 221 | | - indio_dev->dev.parent = &spi->dev; |
|---|
| 222 | | - indio_dev->dev.of_node = spi->dev.of_node; |
|---|
| 223 | 217 | indio_dev->name = spi_get_device_id(spi)->name; |
|---|
| 224 | 218 | indio_dev->modes = INDIO_DIRECT_MODE; |
|---|
| 225 | 219 | indio_dev->info = &adc084s021_info; |
|---|
| .. | .. |
|---|
| 265 | 259 | static struct spi_driver adc084s021_driver = { |
|---|
| 266 | 260 | .driver = { |
|---|
| 267 | 261 | .name = ADC084S021_DRIVER_NAME, |
|---|
| 268 | | - .of_match_table = of_match_ptr(adc084s021_of_match), |
|---|
| 262 | + .of_match_table = adc084s021_of_match, |
|---|
| 269 | 263 | }, |
|---|
| 270 | 264 | .probe = adc084s021_probe, |
|---|
| 271 | 265 | .id_table = adc084s021_id, |
|---|