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/dac | |
parent | 958000dfa36d9bf9191af7cdab1b53ab60095100 (diff) | |
download | linux-stable-2256f37e24b1979f9a97de0b76cabbf8544a8aff.tar.gz linux-stable-2256f37e24b1979f9a97de0b76cabbf8544a8aff.tar.bz2 linux-stable-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/dac')
-rw-r--r-- | drivers/iio/dac/adi-axi-dac.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/iio/dac/adi-axi-dac.c b/drivers/iio/dac/adi-axi-dac.c index e44463f48bf5..9655705b158b 100644 --- a/drivers/iio/dac/adi-axi-dac.c +++ b/drivers/iio/dac/adi-axi-dac.c @@ -507,7 +507,7 @@ static int axi_dac_set_sample_rate(struct iio_backend *back, unsigned int chan, return 0; } -static const struct iio_backend_ops axi_dac_generic = { +static const struct iio_backend_ops axi_dac_generic_ops = { .enable = axi_dac_enable, .disable = axi_dac_disable, .request_buffer = axi_dac_request_buffer, @@ -519,6 +519,11 @@ static const struct iio_backend_ops axi_dac_generic = { .set_sample_rate = axi_dac_set_sample_rate, }; +static const struct iio_backend_info axi_dac_generic = { + .name = "axi-dac", + .ops = &axi_dac_generic_ops, +}; + static const struct regmap_config axi_dac_regmap_config = { .val_bits = 32, .reg_bits = 32, |