.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * ti-dac082s085.c - Texas Instruments 8/10/12-bit 2/4-channel DAC driver |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2017 KUNBUS GmbH |
---|
5 | 6 | * |
---|
6 | | - * http://www.ti.com/lit/ds/symlink/dac082s085.pdf |
---|
7 | | - * http://www.ti.com/lit/ds/symlink/dac102s085.pdf |
---|
8 | | - * http://www.ti.com/lit/ds/symlink/dac122s085.pdf |
---|
9 | | - * http://www.ti.com/lit/ds/symlink/dac084s085.pdf |
---|
10 | | - * http://www.ti.com/lit/ds/symlink/dac104s085.pdf |
---|
11 | | - * http://www.ti.com/lit/ds/symlink/dac124s085.pdf |
---|
12 | | - * |
---|
13 | | - * This program is free software; you can redistribute it and/or modify |
---|
14 | | - * it under the terms of the GNU General Public License (version 2) as |
---|
15 | | - * published by the Free Software Foundation. |
---|
| 7 | + * https://www.ti.com/lit/ds/symlink/dac082s085.pdf |
---|
| 8 | + * https://www.ti.com/lit/ds/symlink/dac102s085.pdf |
---|
| 9 | + * https://www.ti.com/lit/ds/symlink/dac122s085.pdf |
---|
| 10 | + * https://www.ti.com/lit/ds/symlink/dac084s085.pdf |
---|
| 11 | + * https://www.ti.com/lit/ds/symlink/dac104s085.pdf |
---|
| 12 | + * https://www.ti.com/lit/ds/symlink/dac124s085.pdf |
---|
16 | 13 | */ |
---|
17 | 14 | |
---|
18 | 15 | #include <linux/iio/iio.h> |
---|
19 | 16 | #include <linux/module.h> |
---|
| 17 | +#include <linux/mod_devicetable.h> |
---|
20 | 18 | #include <linux/regulator/consumer.h> |
---|
21 | 19 | #include <linux/spi/spi.h> |
---|
22 | 20 | |
---|
.. | .. |
---|
271 | 269 | if (!indio_dev) |
---|
272 | 270 | return -ENOMEM; |
---|
273 | 271 | |
---|
274 | | - indio_dev->dev.parent = dev; |
---|
275 | 272 | indio_dev->info = &ti_dac_info; |
---|
276 | 273 | indio_dev->name = spi->modalias; |
---|
277 | 274 | indio_dev->modes = INDIO_DIRECT_MODE; |
---|
.. | .. |
---|
328 | 325 | return 0; |
---|
329 | 326 | } |
---|
330 | 327 | |
---|
331 | | -#ifdef CONFIG_OF |
---|
332 | 328 | static const struct of_device_id ti_dac_of_id[] = { |
---|
333 | 329 | { .compatible = "ti,dac082s085" }, |
---|
334 | 330 | { .compatible = "ti,dac102s085" }, |
---|
.. | .. |
---|
339 | 335 | { } |
---|
340 | 336 | }; |
---|
341 | 337 | MODULE_DEVICE_TABLE(of, ti_dac_of_id); |
---|
342 | | -#endif |
---|
343 | 338 | |
---|
344 | 339 | static const struct spi_device_id ti_dac_spi_id[] = { |
---|
345 | 340 | { "dac082s085", dual_8bit }, |
---|
.. | .. |
---|
355 | 350 | static struct spi_driver ti_dac_driver = { |
---|
356 | 351 | .driver = { |
---|
357 | 352 | .name = "ti-dac082s085", |
---|
358 | | - .of_match_table = of_match_ptr(ti_dac_of_id), |
---|
| 353 | + .of_match_table = ti_dac_of_id, |
---|
359 | 354 | }, |
---|
360 | 355 | .probe = ti_dac_probe, |
---|
361 | 356 | .remove = ti_dac_remove, |
---|