[PATCH 01/12] iio: adc: rohm-bd79124: Fix rising alarm

From: Matti Vaittinen

Date: Mon Aug 10 2026 - 03:50:30 EST


From: Matti Vaittinen <mazziesaccount@xxxxxxxxx>

The rising alarm is using the cached falling alarm value causing wrong
value to be used.

Fix this by using the correct cached value for rising alarm.

Signed-off-by: Matti Vaittinen <mazziesaccount@xxxxxxxxx>
Fixes: 3f57a3b9ab74 ("iio: adc: Support ROHM BD79124 ADC")
---
drivers/iio/adc/rohm-bd79124.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/adc/rohm-bd79124.c b/drivers/iio/adc/rohm-bd79124.c
index 864f3b1366b5..f703c74309cc 100644
--- a/drivers/iio/adc/rohm-bd79124.c
+++ b/drivers/iio/adc/rohm-bd79124.c
@@ -525,7 +525,7 @@ static int bd79124_enable_event(struct bd79124_data *data,
return ret;

if (dir == IIO_EV_DIR_RISING) {
- limit = &data->alarm_f_limit[channel];
+ limit = &data->alarm_r_limit[channel];
reg = BD79124_GET_HIGH_LIMIT_REG(channel);
} else {
limit = &data->alarm_f_limit[channel];
--
2.55.0

Attachment: signature.asc
Description: PGP signature