staging: iio: resolver: ad2s1210: implement fault events
authorDavid Lechner <dlechner@baylibre.com>
Fri, 6 Oct 2023 00:50:30 +0000 (19:50 -0500)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 11 Oct 2023 14:54:41 +0000 (15:54 +0100)
commita5101e91e94d4f12e402fb4e8b46caa0213ea03a
tree788e24651bb61935b078108bfdfd761e22eabdb3
parent5987279373446e97206a7078b2229446ba871ea0
staging: iio: resolver: ad2s1210: implement fault events

When reading the position and velocity on the AD2S1210, there is also a
3rd byte following the two data bytes that contains the fault flag bits.
This patch adds support for reading this byte and generating events when
faults occur.

The faults are mapped to various channels and event type in order to
have a unique event for each fault.

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