]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iio: gyro: fxas21002c: Fix missing data update in trigger handler
authorCarlos Song <carlos.song@nxp.com>
Sat, 16 Nov 2024 15:29:45 +0000 (10:29 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Jan 2025 16:15:55 +0000 (17:15 +0100)
commitc31009d2bd4959a567397dc19a11688607f72197
treed82afa245c552e0ab220364b8fbb34176db56173
parentaae96738006840533cf147ffd5f41830987f21c5
iio: gyro: fxas21002c: Fix missing data update in trigger handler

commit fa13ac6cdf9b6c358e7d77c29fb60145c7a87965 upstream.

The fxas21002c_trigger_handler() may fail to acquire sample data because
the runtime PM enters the autosuspend state and sensor can not return
sample data in standby mode..

Resume the sensor before reading the sample data into the buffer within the
trigger handler. After the data is read, place the sensor back into the
autosuspend state.

Fixes: a0701b6263ae ("iio: gyro: add core driver for fxas21002c")
Signed-off-by: Carlos Song <carlos.song@nxp.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20241116152945.4006374-1-Frank.Li@nxp.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/gyro/fxas21002c_core.c