diff options
| author | Nuno Sa <nuno.sa@analog.com> | 2024-08-02 16:26:59 +0200 |
|---|---|---|
| committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2024-08-03 14:36:45 +0100 |
| commit | 2256f37e24b1979f9a97de0b76cabbf8544a8aff (patch) | |
| tree | 040cecd38829fe36ec35e05ae9d975aec671edaf /drivers/iio/adc | |
| parent | 958000dfa36d9bf9191af7cdab1b53ab60095100 (diff) | |
| download | linux-2256f37e24b1979f9a97de0b76cabbf8544a8aff.tar.gz linux-2256f37e24b1979f9a97de0b76cabbf8544a8aff.tar.bz2 linux-2256f37e24b1979f9a97de0b76cabbf8544a8aff.zip | |
iio: backend: introduce struct iio_backend_info
Instead of only passing the backend ops when calling
devm_iio_backend_register(), pass an info like structure that will
contains the ops and additional information. Fow now, the backend name
is being added as that will be used by the debugFS interface introduced
in a later patch.
It also opens the door for further customizations passed by backends.
All users of devm_iio_backend_register() were updated accordingly.
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://patch.msgid.link/20240802-dev-iio-backend-add-debugfs-v2-1-4cb62852f0d0@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/adc')
| -rw-r--r-- | drivers/iio/adc/adi-axi-adc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/iio/adc/adi-axi-adc.c b/drivers/iio/adc/adi-axi-adc.c index 21ce7564e83d..0a9d7433da30 100644 --- a/drivers/iio/adc/adi-axi-adc.c +++ b/drivers/iio/adc/adi-axi-adc.c @@ -273,7 +273,7 @@ static const struct regmap_config axi_adc_regmap_config = { .reg_stride = 4, }; -static const struct iio_backend_ops adi_axi_adc_generic = { +static const struct iio_backend_ops adi_axi_adc_ops = { .enable = axi_adc_enable, .disable = axi_adc_disable, .data_format_set = axi_adc_data_format_set, @@ -287,6 +287,11 @@ static const struct iio_backend_ops adi_axi_adc_generic = { .chan_status = axi_adc_chan_status, }; +static const struct iio_backend_info adi_axi_adc_generic = { + .name = "axi-adc", + .ops = &adi_axi_adc_ops, +}; + static int adi_axi_adc_probe(struct platform_device *pdev) { const unsigned int *expected_ver; |
