Lines Matching +full:io +full:- +full:backends

1 // SPDX-License-Identifier: GPL-2.0
5 * Copyright 2011 - 2024 Analog Devices Inc.
11 #include <linux/io.h>
52 for (c = 0; c < indio_dev->num_channels; c++) {
54 ret = iio_backend_chan_enable(st->back, c);
56 ret = iio_backend_chan_disable(st->back, c);
74 st->back = devm_iio_backend_get(dev, NULL);
75 if (IS_ERR(st->back))
76 return PTR_ERR(st->back);
79 if (!st->cnvst_pwm)
80 return dev_err_probe(st->dev, -EINVAL,
83 ret = devm_iio_backend_request_buffer(dev, st->back, indio_dev);
87 ret = devm_iio_backend_enable(dev, st->back);
91 for (c = 0; c < indio_dev->num_channels; c++) {
92 ret = iio_backend_data_format_set(st->back, c, &data);
97 indio_dev->channels = ad7606b_bi_channels;
98 indio_dev->num_channels = 8;
105 struct ad7606_platform_data *pdata = st->dev->platform_data;
108 ret = pdata->bus_reg_read(st->back, addr, &val);
118 struct ad7606_platform_data *pdata = st->dev->platform_data;
120 return pdata->bus_reg_write(st->back, addr, val);
125 indio_dev->channels = ad7606b_bi_sw_channels;
157 if (st->gpio_frstdata) {
158 insw((unsigned long)st->base_address, _buf, 1);
159 if (!gpiod_get_value(st->gpio_frstdata)) {
161 return -EIO;
164 num--;
166 insw((unsigned long)st->base_address, _buf, num);
191 if (st->gpio_frstdata) {
192 insb((unsigned long)st->base_address, _buf, 2);
193 if (!gpiod_get_value(st->gpio_frstdata)) {
195 return -EIO;
198 num--;
200 insb((unsigned long)st->base_address, _buf, num * 2);
222 if (dev_fwnode(&pdev->dev)) {
223 chip_info = device_get_match_data(&pdev->dev);
224 if (device_property_present(&pdev->dev, "io-backends"))
229 return ad7606_probe(&pdev->dev, 0, NULL,
234 chip_info = (const struct ad7606_chip_info *)id->driver_data;
247 return ad7606_probe(&pdev->dev, irq, addr, chip_info,
253 { .name = "ad7605-4", .driver_data = (kernel_ulong_t)&ad7605_4_info, },
254 { .name = "ad7606-4", .driver_data = (kernel_ulong_t)&ad7606_4_info, },
255 { .name = "ad7606-6", .driver_data = (kernel_ulong_t)&ad7606_6_info, },
256 { .name = "ad7606-8", .driver_data = (kernel_ulong_t)&ad7606_8_info, },
266 { .compatible = "adi,ad7605-4", .data = &ad7605_4_info },
267 { .compatible = "adi,ad7606-4", .data = &ad7606_4_info },
268 { .compatible = "adi,ad7606-6", .data = &ad7606_6_info },
269 { .compatible = "adi,ad7606-8", .data = &ad7606_8_info },