Re: [PATCH] iio: ccs811: Deassert WAKE GPIO on error paths
From: Joshua Crofts
Date: Thu Oct 15 2026 - 05:15:44 EST
On Wed, 14 Oct 2026 20:52:50 +0530
Nikhil Gautam <nikhilgtr@xxxxxxxxx> wrote:
> Ensure the WAKE GPIO is deasserted when status polling fails or
> the data-ready timeout expires. Early returns could leave WAKE asserted,
> preventing the sensor from returning to its low-power state and
> potentially disrupting subsequent I2C transactions.
>
> Route error paths through a common cleanup label to ensure WAKE is
> deasserted before returning.
>
> Signed-off-by: Nikhil Gautam <nikhilgtr@xxxxxxxxx>
Please add a Fixes tag.
...
> ret = i2c_smbus_read_i2c_block_data(data->client,
> CCS811_ALG_RESULT_DATA, 8,
> (char *)&data->buffer);
> +out:
> ccs811_set_wakeup(data, false);
> -
Keep the blank line.
> return ret;
> }
>
Otherwise,
Reviewed-by: Joshua Crofts <joshua.crofts1@xxxxxxxxx>
--
Kind regards,
Joshua Crofts