staging:iio:adc:ad7280a: Switch to standard event control
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 6 Feb 2022 19:03:14 +0000 (19:03 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 21 Feb 2022 19:33:04 +0000 (19:33 +0000)
commit112bf4aa4afb5608d77ac9208758528bcdfae70d
tree56973d75b5680fb85982570ac9fdc52258375a88
parent4915c6b3dd19fd331e3f189c92b27e14849d72fe
staging:iio:adc:ad7280a: Switch to standard event control

This driver had a slightly non standard events ABI but there seems
to be no reason for not doing it with the core support for rising and
falling events on the two types of channels.

In theory the events on different daisy chained chips could be at
different levels, but the driver has never supported this and it doesn't
seem likely to be used so let us ignore that option.

Includes reordering so that we only set the software cached value
of the thresholds if the hardware write succeeds.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Link: https://lore.kernel.org/r/20220206190328.333093-7-jic23@kernel.org
drivers/staging/iio/adc/ad7280a.c