iio: accel: kxcjk-1013: Deduplicate setup interrupt functions
authorGustavo Vaz <gustavo.vaz@usp.br>
Wed, 23 Apr 2025 20:46:31 +0000 (17:46 -0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 21 May 2025 13:20:28 +0000 (14:20 +0100)
commit7ba4251181243ddd388be8d0c70564b5d9a8c3ca
tree8e0635955cfccdd3c8fa59115256ede7ffcc8c37
parente50cf7e2e6e0e1fe106384eab938faf712e6230f
iio: accel: kxcjk-1013: Deduplicate setup interrupt functions

The contents of kxcjk1013_setup_any_motion_interrupt and
kxcj1013_setup_new_data_interrupt are very similar. Deduplicate these
functions by introducing a generic function named
kxcjk1013_setup_interrupt that has an additional flag indicating if
it's a new data interrupt.

Signed-off-by: Gustavo Vaz <gustavo.vaz@usp.br>
Co-developed-by: Francisco Henriques <franciscolealhenriques@usp.br>
Signed-off-by: Francisco Henriques <franciscolealhenriques@usp.br>
Link: https://patch.msgid.link/20250423204631.16460-1-gustavo.vaz@usp.br
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/accel/kxcjk-1013.c