[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <45cbf569-6046-46a7-9a76-7411e89af99a@baylibre.com>
Date: Sat, 7 Feb 2026 12:43:08 -0600
From: David Lechner <dlechner@...libre.com>
To: Tomas Melin <tomas.melin@...sala.com>,
Michael Hennerich <Michael.Hennerich@...log.com>,
Nuno Sa <nuno.sa@...log.com>, Lars-Peter Clausen <lars@...afoo.de>,
Jonathan Cameron <jic23@...nel.org>, Andy Shevchenko <andy@...nel.org>,
Olivier Moysan <olivier.moysan@...s.st.com>
Cc: linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 5/5] iio: adc: ad9467: check for backend capabilities
On 2/5/26 6:24 AM, Tomas Melin wrote:
> Add capability checks for operation with backends that do not necessarily
> support full set of features, but are otherwise compatible with the device.
> This ensures a fully functional device, but with limited capabilities.
>
> Signed-off-by: Tomas Melin <tomas.melin@...sala.com>
> ---
> drivers/iio/adc/ad9467.c | 67 +++++++++++++++++++++++++++++-------------------
> 1 file changed, 41 insertions(+), 26 deletions(-)
>
> diff --git a/drivers/iio/adc/ad9467.c b/drivers/iio/adc/ad9467.c
> index 59c3fa3bcc9b..7a3db36121b0 100644
> --- a/drivers/iio/adc/ad9467.c
> +++ b/drivers/iio/adc/ad9467.c
> @@ -913,7 +913,9 @@ static int __ad9467_update_clock(struct ad9467_state *st, long r_clk)
> return ret;
>
> guard(mutex)(&st->lock);
> - return ad9467_calibrate(st);
> + if (iio_backend_has_caps(st->back, IIO_BACKEND_CAP_CALIBRATION))
> + return ad9467_calibrate(st);
> + return 0;
> }
>
I would appreciate a blank line before and after the if statement
if we end up needing a v7.
Powered by blists - more mailing lists