iio: adc: ad9467: support digital interface calibration
authorNuno Sa <nuno.sa@analog.com>
Fri, 26 Apr 2024 15:42:16 +0000 (17:42 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 29 Apr 2024 19:53:26 +0000 (20:53 +0100)
commit05c4081fbf4c98864dcf6c212afe9f611243dc92
tree4e6dba95043487b0a6c16bfc110e221b1f1d02e6
parent7ecb8ee5c93be9f00cbf090f7f53b2a32d995184
iio: adc: ad9467: support digital interface calibration

To make sure that we have the best timings on the serial data interface
we should calibrate it. This means going through the device supported
values and see for which ones we get a successful result. To do that, we
use a prbs test pattern both in the IIO backend and in the frontend
devices. Then for each of the test points we see if there are any
errors. Note that the backend is responsible to look for those errors.

As calibrating the interface also requires that the data format is disabled
(the one thing being done in ad9467_setup()), ad9467_setup() was removed
and configuring the data fomat is now part of the calibration process.

Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240426-ad9467-new-features-v2-7-6361fc3ba1cc@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad9467.c