]> git.hungrycats.org Git - linux/commit
iio: magnetometer: ak8975: Fix reading for ak099xx sensors
authorBarnabás Czémán <barnabas.czeman@mainlining.org>
Sun, 18 Aug 2024 22:29:40 +0000 (00:29 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 3 Sep 2024 17:49:43 +0000 (18:49 +0100)
commit129464e86c7445a858b790ac2d28d35f58256bbe
treecee986fe56d726a3ade8cbfc45471991f258e640
parent3b92fc43bfd961fe83c82efd6bc8a852a29ea4de
iio: magnetometer: ak8975: Fix reading for ak099xx sensors

Move ST2 reading with overflow handling after measurement data
reading.
ST2 register read have to be read after read measurment data,
because it means end of the reading and realease the lock on the data.
Remove ST2 read skip on interrupt based waiting because ST2 required to
be read out at and of the axis read.

Fixes: 57e73a423b1e ("iio: ak8975: add ak09911 and ak09912 support")
Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
Link: https://patch.msgid.link/20240819-ak09918-v4-2-f0734d14cfb9@mainlining.org
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/magnetometer/ak8975.c