public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Add support for AK09918
@ 2024-08-05 20:31 Barnabás Czémán
  2024-08-05 20:31 ` [PATCH 1/3] iio: magnetometer: ak8975: Fix reading for ak099xx sensors Barnabás Czémán
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Barnabás Czémán @ 2024-08-05 20:31 UTC (permalink / raw)
  To: Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Jonathan Albrieux
  Cc: linux-iio, linux-kernel, devicetree, linux,
	Barnabás Czémán, Danila Tikhonov

Add support for AK09918 which is register and scaling compatible with
AK09912.

It was tested in Xiaomi Redmi 5 Plus (vince).

magnetometer@c {
  compatible = "asahi-kasei,ak09918";
  reg = <0x0c>;
  vdd-supply = <&pm8953_l6>;
  mount-matrix = "1", "0", "0",
                 "0", "1", "0",
                 "0", "0", "1";
};

Add a fix for data reading according to datasheet [1] (9.4.3.2.)
ST2 register should be read out after read measurment data as third step.
ST2 read out is required and get correct value during measurment data
read.

[1] https://www.akm.com/content/dam/documents/products/electronic-compass/ak09918c/ak09918c-en-datasheet.pdf

Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
---
Barnabás Czémán (1):
      iio: magnetometer: ak8975: Fix reading for ak099xx sensors

Danila Tikhonov (2):
      dt-bindings: iio: imu: magnetometer: Add ak09118
      iio: magnetometer: ak8975: Add AK09118 support

 .../iio/magnetometer/asahi-kasei,ak8975.yaml       |  2 +
 drivers/iio/magnetometer/Kconfig                   |  2 +-
 drivers/iio/magnetometer/ak8975.c                  | 66 ++++++++++++++++------
 3 files changed, 53 insertions(+), 17 deletions(-)
---
base-commit: d6dbc9f56c3a70e915625b6f1887882c23dc5c91
change-id: 20240805-ak09918-4a6cfef91c32

Best regards,
-- 
Barnabás Czémán <barnabas.czeman@mainlining.org>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-08-06  5:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-05 20:31 [PATCH 0/3] Add support for AK09918 Barnabás Czémán
2024-08-05 20:31 ` [PATCH 1/3] iio: magnetometer: ak8975: Fix reading for ak099xx sensors Barnabás Czémán
2024-08-05 20:31 ` [PATCH 2/3] dt-bindings: iio: imu: magnetometer: Add ak09118 Barnabás Czémán
2024-08-06  5:21   ` Krzysztof Kozlowski
2024-08-05 20:31 ` [PATCH 3/3] iio: magnetometer: ak8975: Add AK09118 support Barnabás Czémán
2024-08-06  5:22   ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox