iio: adc: ad7280a: use IIO_DIFF_EVENT_CODE macro helper
authorJulien Stephan <jstephan@baylibre.com>
Mon, 28 Oct 2024 16:38:12 +0000 (17:38 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 3 Nov 2024 20:33:45 +0000 (20:33 +0000)
commit7f4f3c4e977f7d31c431a004640d763dc356e2ec
treed8109854ecabb3f0b122aadba7ba9f9864b82210
parent5d8173b8493151d32b99ec6732fb29c58256a7c8
iio: adc: ad7280a: use IIO_DIFF_EVENT_CODE macro helper

The IIO_DIFF_EVENT_CODE macro helper was introduced to provide a more
specific alternative to the generic IIO_EVENT_CODE macro for handling
differential channels. This commit updates the code to use
IIO_DIFF_EVENT_CODE for better clarity and maintainability.

However, the current implementation incorrectly sets both chan1 and
chan2 to 0. To maintain compatibility and avoid breaking existing
user space applications, this behavior is preserved for now.

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20241028-iio-add-macro-for-even-identifier-for-differential-channels-v1-2-b452c90f7ea6@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad7280a.c