iio: adc: palmas: use iio_event_direction for threshold polarity
authorPatrik Dahlström <risca@dalakolonin.se>
Sat, 8 Apr 2023 11:48:21 +0000 (13:48 +0200)
committerJonathan Cameron <jonathan.cameron@huawei.com>
Thu, 13 Apr 2023 10:37:21 +0000 (11:37 +0100)
commit7501a3a97e4f000c1881f228132ead7a2fa5725c
tree41ab184a0b884dd3950a61ecf6d5216108ae14cb
parentd2ab4eea732dd2e235ba2a488344612a07a20334
iio: adc: palmas: use iio_event_direction for threshold polarity

Instead of having high_threshold > 0 as an indicator for upper threshold
event and lower threshold event otherwise, use enum iio_event_direction
instead. This is hopefully less ambiguous.

Signed-off-by: Patrik Dahlström <risca@dalakolonin.se>
Link: https://lore.kernel.org/r/20230408114825.824505-6-risca@dalakolonin.se
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/palmas_gpadc.c