[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aTAxo5sM90vwgxTT@smile.fi.intel.com>
Date: Wed, 3 Dec 2025 14:48:35 +0200
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Tomas Melin <tomas.melin@...sala.com>
Cc: Lars-Peter Clausen <lars@...afoo.de>,
Michael Hennerich <Michael.Hennerich@...log.com>,
Nuno Sa <nuno.sa@...log.com>, Jonathan Cameron <jic23@...nel.org>,
David Lechner <dlechner@...libre.com>,
Andy Shevchenko <andy@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, linux-iio@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] iio: adc: ad9467: add support for ad9211
On Wed, Dec 03, 2025 at 12:20:34PM +0000, Tomas Melin wrote:
> The AD9211 is a 10-bit monolithic sampling analog-to-digital
> converter optimized for high performance, low power, and ease
> of use. The product operates at up to a 300 MSPS conversion
> rate and is optimized for outstanding dynamic performance
> in wideband carrier and broadband systems.
>
> The scale table implemented here is not an exact match with the
> datasheet as the table presented there is missing some information.
> The reference presents these values as being linear,
> but that does not add up. There is information missing in the table.
> Implemented scale table matches values at the middle and at the ends,
> smoothing the curve towards middle and end.
> Impact on end result from deviation in scale factor affects only software
> using it for scaling. All the possible hw-settings are also available with
> this implementation.
> Link: https://www.analog.com/media/en/technical-documentation/data-sheets/AD9211.pdf
Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/AD9211.pdf
> Signed-off-by: Tomas Melin <tomas.melin@...sala.com>
...
> +static const struct ad9467_chip_info ad9211_chip_tbl = {
> + .name = "ad9211",
> + .id = CHIPID_AD9211,
> + .max_rate = 300000000UL,
It's too many 0:s. Less error prone is to write it as
300 * HZ_PER_MHZ
> + .scale_table = ad9211_scale_table,
> + .num_scales = ARRAY_SIZE(ad9211_scale_table),
> + .channels = ad9211_channels,
> + .num_channels = ARRAY_SIZE(ad9211_channels),
> + .test_points = AD9647_MAX_TEST_POINTS,
> + .test_mask = GENMASK(AN877_ADC_TESTMODE_ONE_ZERO_TOGGLE,
> + AN877_ADC_TESTMODE_OFF),
> + .test_mask_len = AN877_ADC_TESTMODE_ONE_ZERO_TOGGLE + 1,
> + .default_output_mode = AD9211_DEF_OUTPUT_MODE,
> + .vref_mask = AD9211_REG_VREF_MASK,
> + .has_dco = true,
> +};
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists