[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <455de3ad-73df-4940-91a8-1416ead37b49@baylibre.com>
Date: Fri, 30 May 2025 12:17:36 -0500
From: David Lechner <dlechner@...libre.com>
To: Angelo Dureghello <adureghello@...libre.com>,
Jonathan Cameron <jic23@...nel.org>, Nuno Sá
<nuno.sa@...log.com>, Andy Shevchenko <andy@...nel.org>,
Lars-Peter Clausen <lars@...afoo.de>,
Michael Hennerich <Michael.Hennerich@...log.com>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>
Cc: linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org
Subject: Re: [PATCH v7 6/6] iio: adc: ad7606: add gain calibration support
On 5/26/25 5:03 AM, Angelo Dureghello wrote:
> From: Angelo Dureghello <adureghello@...libre.com>
>
> Add gain calibration support, using resistor values set on devicetree,
> values to be set accordingly with ADC external RFilter, as explained in
> the ad7606c-16 datasheet, rev0, page 37.
>
> Usage example in the fdt yaml documentation.
>
> Tested-by: David Lechner <dlechner@...libre.com>
> Reviewed-by: Nuno Sá <nuno.sa@...log.com>
> Signed-off-by: Angelo Dureghello <adureghello@...libre.com>
> ---
...
> @@ -1444,6 +1485,13 @@ static int ad7606_probe_channels(struct iio_dev *indio_dev)
> if (slow_bus)
> channels[i] = (struct iio_chan_spec)IIO_CHAN_SOFT_TIMESTAMP(i);
>
> + /* Setting up gain calibration for all channels. */
> + if (st->sw_mode_en && st->chip_info->calib_offset_avail) {
More logical would be:
if (st->sw_mode_en && st->chip_info->calib_gain_setup_cb) {
> + ret = st->chip_info->calib_gain_setup_cb(indio_dev);
> + if (ret)
> + return ret;
> + }
> +
> indio_dev->channels = channels;
>
Powered by blists - more mailing lists