Re: [PATCH] iio: light: stk3310: Deal with the ps interrupt issue in PM
From: Joshua Crofts
Date: Mon Apr 27 2026 - 06:20:11 EST
On Mon, 27 Apr 2026 at 11:48, Miao Li <limiao870622@xxxxxxx> wrote:
> @@ -296,8 +299,15 @@ static int stk3310_write_event(struct iio_dev *indio_dev,
>
> buf = cpu_to_be16(val);
> ret = regmap_bulk_write(data->regmap, reg, &buf, 2);
> - if (ret < 0)
> + if (ret < 0) {
> dev_err(&client->dev, "failed to set PS threshold!\n");
> + return ret;
> + }
> +
> + if (reg == STK3310_REG_THDH_PS)
> + data->ps_thdh = val;
> + else
> + data->ps_thdl = val;
>
> return ret;
> }
Maybe add mutex_lock() and mutex_unlock() here as well? Just
as stk3310_write_event_config().
--
Kind regards
CJD