summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorJoshua Crofts <joshua.crofts1@gmail.com>2026-05-13 16:35:52 +0200
committerJonathan Cameron <jic23@kernel.org>2026-05-31 10:59:40 +0100
commiteaead586b3d95890832449f2887283b067426ecc (patch)
tree9f54b004d3b1ae8e5f7055ed25e664941ac646af /tools/perf/scripts/python
parent8bf3e7a9defcfa889976258919d99fa2e8465189 (diff)
iio: magnetometer: ak8975: ensure device is awake for buffered capture
Currently, the ak8975_start_read_axis() can be called while the device is autosuspended, causing two issues: 1. I2C transfers in the aforementioned function will fail or timeout because ak8975_runtime_suspend() disables the device regulators. 2. Since ak8975_fill_buffer() does not hold runtime references, ak8975_runtime_suspend() can run concurrently, and since PM callbacks do not use a locking mechanism, it may cause a race accessing the control register via the I2C bus. Fix this issue by adding struct iio_buffer_setup_ops that contains preenable and postdisable functions to ensure correct that device is powered on when running a buffered capture. Fixes: bc11ca4a0b84 ("iio:magnetometer:ak8975: triggered buffer support") Reported-by: Sashiko <sashiko-bot@kernel.org> Closes: https://sashiko.dev/#/patchset/20260511-magnetometer-fixes-post-pickup-v7-0-9d910faa28b6%40gmail.com Cc: <Stable@vger.kernel.org> Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions