staging: iio: resolver: ad2s1210: add phase lock range support
authorDavid Lechner <dlechner@baylibre.com>
Fri, 6 Oct 2023 00:50:22 +0000 (19:50 -0500)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 11 Oct 2023 14:54:40 +0000 (15:54 +0100)
commitb3335cd557fb886cd58ac6f9d0b283bbab120411
tree9c6aba6317e31d76525d90cdee7b4e3c7b23d0a9
parent3e7d173aef28d05a8db2941d78498f67746b27bc
staging: iio: resolver: ad2s1210: add phase lock range support

The AD2S1210 chip has a phase lock range feature that allows selecting
the allowable phase difference between the excitation output and the
sine and cosine inputs. This can be set to either 44 degrees (default)
or 360 degrees.

This patch adds a new phase channel with a phase0_mag_rising event that
can be used to configure the phase lock range. Actually emitting the
event will be added in a subsequent patch.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://lore.kernel.org/r/20231005-ad2s1210-mainline-v4-5-ec00746840fc@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/staging/iio/resolver/ad2s1210.c