diff options
author | Nuno Sa <nuno.sa@analog.com> | 2024-08-06 15:35:07 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2024-08-10 11:17:33 +0100 |
commit | 69eac4e1e293b94455f9cc68893126952007bac4 (patch) | |
tree | 90b7e4516fb992691460a620f842a3d30b632e57 /drivers/iio/dac | |
parent | 24a9453c03686110f641697a09e07cefc57a0b87 (diff) |
iio: dac: ad9739a: add backend debugfs interface
Call iio_backend_debugfs_add() to add (if available) the backend debug
interface.
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://patch.msgid.link/20240806-dev-backend-dac-direct-reg-access-v1-2-b84a6e8ee8a0@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/dac')
-rw-r--r-- | drivers/iio/dac/ad9739a.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/iio/dac/ad9739a.c b/drivers/iio/dac/ad9739a.c index 799387f21b9f..615d1a196db3 100644 --- a/drivers/iio/dac/ad9739a.c +++ b/drivers/iio/dac/ad9739a.c @@ -431,7 +431,13 @@ static int ad9739a_probe(struct spi_device *spi) indio_dev->num_channels = ARRAY_SIZE(ad9739a_channels); indio_dev->setup_ops = &ad9739a_buffer_setup_ops; - return devm_iio_device_register(&spi->dev, indio_dev); + ret = devm_iio_device_register(&spi->dev, indio_dev); + if (ret) + return ret; + + iio_backend_debugfs_add(st->back, indio_dev); + + return 0; } static const struct of_device_id ad9739a_of_match[] = { |