staging: iio: resolver: ad2s1210: clear faults after soft reset
authorDavid Lechner <dlechner@baylibre.com>
Tue, 10 Oct 2023 21:12:34 +0000 (16:12 -0500)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 12 Oct 2023 07:59:13 +0000 (08:59 +0100)
commit4efa877ac942d63c335820bf52d262e76901bea9
treec181a4972e7d535063bf7a96d1eea8031462fbb2
parent27ffa2216acfab3527064ec13666f35d70f76045
staging: iio: resolver: ad2s1210: clear faults after soft reset

When a software reset is performed on the AD2S1210 to make the selected
excitation frequency take effect, it always triggers faults on the
input signals because the output signal is interrupted momentarily.
So we need to clear the faults after the software reset to avoid
triggering fault events the next time a sample is read.

The datasheet specifies a time t[track] in Table 27 that specifies the
settle time in milliseconds after a reset depending on the selected
resolution. This is used in the driver to add an appropriate delay.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://lore.kernel.org/r/20231010-ad2s1210-mainline-v5-2-35a0f6ffa04a@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/staging/iio/resolver/ad2s1210.c