From: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Marcelo Schmitt <marcelo.schmitt@analog.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, linux@analog.com,
Michael.Hennerich@analog.com, nuno.sa@analog.com,
eblanc@baylibre.com, dlechner@baylibre.com, andy@kernel.org,
robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
olivier.moysan@foss.st.com
Subject: Re: [PATCH v1 1/5] iio: backend: Add calibration source interface
Date: Thu, 19 Nov 2026 17:33:58 -0300 [thread overview]
Message-ID: <av9dNvWzHlbvBZf4@debian-BULLSEYE-live-builder-AMD64> (raw)
In-Reply-To: <20261119025747.53b30ba4@jic23-hlaptop>
On 11/19, Jonathan Cameron wrote:
> On Wed, 18 Nov 2026 10:03:17 -0300
> Marcelo Schmitt <marcelo.schmitt@analog.com> wrote:
>
> > Some ADC front-ends send data over a configurable number of LVDS serial
> > lanes and may also need to have the data frame calibrated before capture
> > can start.
> >
> > Add a backend operation for selecting the calibration source (data lane or
> > data frame) so that device drivers can perform the calibration of both the
> > data frame and data lanes.
> >
> > Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
> > ---
> > drivers/iio/industrialio-backend.c | 23 +++++++++++++++++++++++
> > include/linux/iio/backend.h | 22 ++++++++++++++++++++++
> > 2 files changed, 45 insertions(+)
> >
> > diff --git a/drivers/iio/industrialio-backend.c b/drivers/iio/industrialio-backend.c
> > index fbf5c39d7655..682d5f735071 100644
> > --- a/drivers/iio/industrialio-backend.c
> > +++ b/drivers/iio/industrialio-backend.c
> > @@ -869,6 +869,29 @@ int iio_backend_interface_data_align(struct iio_backend *back, u32 timeout_us)
> > }
> > EXPORT_SYMBOL_NS_GPL(iio_backend_interface_data_align, "IIO_BACKEND");
> >
> > +/**
> > + * iio_backend_calibration_source_set - Select the monitored error source
> > + * @back: Backend device
> > + * @source: Error source to monitor.
> > + * @lane: Data lane to monitor. Only meaningful for
> > + * %IIO_BACKEND_CALIB_SOURCE_DATA_LANE.
> > + *
> > + * Restrict the error reported through iio_backend_chan_status() to a single
> > + * source of the digital interface so that each lane can be calibrated
> > + * independently. Backends are expected to report every error source again
> > + * once %IIO_BACKEND_CALIB_SOURCE_NONE is selected.
>
> I don't follow this description at all. If there is more than one how
> does it report 'every' error source?
>
> Add some explanation, probably to the commit message on how the
> flow using this works. We might need more info here as well.
I've complemented the explanation about this new backend operation. I'll try
to further improve for v2 if the description below is still sounding confusing.
Some ADC front-ends group and send data from a single channel over a
configurable number of LVDS serial lanes and may also need to perform a
data frame calibration before capture can start. During a channel interface
calibration, the front-end device driver usually requests the channel
status multiple times to find out the optimal calibration point.
However, the backend channel status interface doesn't provide which
specific serial lane or data frame flagged errors when they occur. The lack
of error source information prevents proper calibration of channels
comprised of multiple serial lanes.
Instead, the backend may have a separate error source mask configuration to
restrict which digital interface source will have its errors reported
through iio_backend_chan_status(). With that, each serial lane can be
calibrated independently, enabling multiple lane LVDS channels to be
properly calibrated and supported.
Add a backend operation for selecting the calibration source (data lane or
data frame) so that device drivers can perform the calibration of both the
data frame and data lanes. Backends are expected to report every error source
when IIO_BACKEND_CALIB_SOURCE_NONE is selected.
sashiko comments seem to apply. Will, fix those for v2.
Thanks,
Marcelo
next prev parent reply other threads:[~2026-11-19 20:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 13:02 [PATCH v1 0/5] Add support for ADA4355 Marcelo Schmitt
2026-11-18 13:03 ` [PATCH v1 1/5] iio: backend: Add calibration source interface Marcelo Schmitt
2026-11-19 2:57 ` Jonathan Cameron
2026-11-19 20:33 ` Marcelo Schmitt [this message]
2026-11-18 13:03 ` [PATCH v1 2/5] dt-bindings: iio: adc: Add AXI ADA4355 IP CORE Marcelo Schmitt
2026-11-18 17:38 ` Conor Dooley
2026-11-18 13:03 ` [PATCH v1 3/5] iio: adc: adi-axi-adc: Support AXI ADA4355 IP core Marcelo Schmitt
2026-11-18 13:04 ` [PATCH v1 4/5] dt-bindings: iio: adc: Add ADA4355 Marcelo Schmitt
2026-11-18 17:39 ` Conor Dooley
2026-11-19 2:59 ` Jonathan Cameron
2026-11-19 14:53 ` Marcelo Schmitt
2026-11-18 13:04 ` [PATCH v1 5/5] iio: adc: Add support for ADA4355 and similar ADCs Marcelo Schmitt
2026-11-19 3:16 ` 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=av9dNvWzHlbvBZf4@debian-BULLSEYE-live-builder-AMD64 \
--to=marcelo.schmitt1@gmail.com \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=eblanc@baylibre.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@analog.com \
--cc=marcelo.schmitt@analog.com \
--cc=nuno.sa@analog.com \
--cc=olivier.moysan@foss.st.com \
--cc=robh@kernel.org \
/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
all inboxes | Powered by JetHome®