staging: iio: resolver: ad2s1210: refactor setting excitation frequency
authorDavid Lechner <dlechner@baylibre.com>
Fri, 29 Sep 2023 17:23:20 +0000 (12:23 -0500)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 5 Oct 2023 13:44:05 +0000 (14:44 +0100)
commitde69623c7cc7b960ee5bec134707bf6567199fc9
tree3fc753c3d4c4b44195d29afe0049bc2a4fa929a0
parent168115f989311867b48292f4f056eb2f96cef67b
staging: iio: resolver: ad2s1210: refactor setting excitation frequency

This combines the ad2s1210_update_frequency_control_word() and
ad2s1210_soft_reset() functions into a single function since they
both have to be called together. (The software reset does not reset
any configuration registers, it only updates the excitation output
and resets the tracking loop.)

Also clean up a few things while touching this:
- move AD2S1210_DEF_EXCIT macro with similar macros
- remove unnecessary dev_err() calls

Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://lore.kernel.org/r/20230929-ad2s1210-mainline-v3-15-fa4364281745@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/staging/iio/resolver/ad2s1210.c