Re: [PATCH 01/12] iio: adc: rohm-bd79124: Fix rising alarm
From: Jonathan Cameron
Date: Sun Aug 16 2026 - 21:17:25 EST
On Mon, 10 Aug 2026 10:49:56 +0300
Matti Vaittinen <matti.vaittinen@xxxxxxxxx> wrote:
> 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")
Applied to the fixes-togreg branch of iio.git and marked for stable.
Thanks,
Jonathan
> ---
> 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];