From: Nuno Sa via B4 Relay <devnull+nuno.sa.analog.com@kernel.org>
To: linux-iio@vger.kernel.org
Cc: Lars-Peter Clausen <lars@metafoo.de>,
Michael Hennerich <Michael.Hennerich@analog.com>,
Jonathan Cameron <jic23@kernel.org>,
Dragos Bogdan <dragos.bogdan@analog.com>
Subject: [PATCH 2/2] iio: dac: ad9739a: add backend debugfs interface
Date: Tue, 06 Aug 2024 15:35:07 +0200 [thread overview]
Message-ID: <20240806-dev-backend-dac-direct-reg-access-v1-2-b84a6e8ee8a0@analog.com> (raw)
In-Reply-To: <20240806-dev-backend-dac-direct-reg-access-v1-0-b84a6e8ee8a0@analog.com>
From: Nuno Sa <nuno.sa@analog.com>
Call iio_backend_debugfs_add() to add (if available) the backend debug
interface.
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
---
drivers/iio/dac/ad9739a.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
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[] = {
--
2.45.2
next prev parent reply other threads:[~2024-08-06 13:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-06 13:35 [PATCH 0/2] iio: dac: add backend debugfs direct_reg_access Nuno Sa via B4 Relay
2024-08-06 13:35 ` [PATCH 1/2] iio: dac: adi-axi-dac: support " Nuno Sa via B4 Relay
2024-08-06 13:35 ` Nuno Sa via B4 Relay [this message]
2024-08-06 16:00 ` [PATCH 0/2] iio: dac: add backend " Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240806-dev-backend-dac-direct-reg-access-v1-2-b84a6e8ee8a0@analog.com \
--to=devnull+nuno.sa.analog.com@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=dragos.bogdan@analog.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=nuno.sa@analog.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox