staging: iio: resolver: ad2s1210: refactor sample toggle
authorDavid Lechner <dlechner@baylibre.com>
Tue, 10 Oct 2023 21:12:33 +0000 (16:12 -0500)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 12 Oct 2023 07:56:08 +0000 (08:56 +0100)
commit27ffa2216acfab3527064ec13666f35d70f76045
treee5832bb8b82159c036f272a264bd681c2185c86c
parent73aa842baf877cc8c8da819f4ea927307dd8b6e4
staging: iio: resolver: ad2s1210: refactor sample toggle

This refactors the sample line toggle in the ad2s1210 resolver driver
to a separate function. The sample has some timing requirements, so
this ensures that it is always done the same way, both in the existing
call sites and any future usage.

Previously, the sample line was kept on for the duration of the read,
but this is not necessary. Data is latched in on the rising edge and
after the specified delay the state of the sample line does not matter.

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