Skip to content

Add support for AK09918

Barnabás Czémán linux-devicetree linux-iio lkml 4 versions – In review

Get series with b4
b4 am [email protected] change-id 20240805-ak09918-4a6cfef91c32

Versions newest first

  1. v4 Latest4 patches 6 repliesIn review
  2. v34 patches 7 repliesSuperseded
  3. v23 patches 10 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v13 patches2 repliesSuperseded

Changes in v4 from the cover letter

- Fix commit title.
- Add Fixes tag.
- Add more comments inline.
- Rebase on latest next.
- Link to v3: https://lore.kernel.org/r/[email protected]

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4iio: magnetometer: ak8975: Relax failure on unknown iddrivers/iio/magnetometer/ak8975.c+6 -34 replies
2/4iio: magnetometer: ak8975: Fix reading for ak099xx sensorsdrivers/iio/magnetometer/ak8975.c+16 -160 replies
3/4dt-bindings: iio: magnetometer: Add ak09118Documentation/devicetree/bindings/iio/magnetometer/asahi-kasei,ak8975.yaml+4 -01 reply
4/4iio: magnetometer: ak8975: Add AK09118 supportdrivers/iio/magnetometer/Kconfig drivers/iio/magnetometer/ak8975.c+38 -11 reply

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by.

PatchKrzysztof KozlowskiConor Dooley
1/4
2/4
3/4A-b
4/4A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/4] Add support for AK09918

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", "asahi-kasei,ak09912"; 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 have to be read out after read measurment data as third step because ST2 will realasing the lock on the measurment data. Without it the next reading will fail.

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

---
Changes in v4:
- Fix commit title.
- Add Fixes tag.
- Add more comments inline.
- Rebase on latest next.
- Link to v3: https://lore.kernel.org/r/[email protected]

Changes in v3:
- Relax failure on unknown device id
for support more register compatible variants.
- Change to fallback compatible.
- Make ST2 to be always read after measuremnt read.
- Reword fix commit with more explanation.
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- Remove unnecessary ak09918 compatbile.
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Barnabás Czémán (2):
iio: magnetometer: ak8975: Relax failure on unknown id
iio: magnetometer: ak8975: Fix reading for ak099xx sensors

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

 .../iio/magnetometer/asahi-kasei,ak8975.yaml       |  4 ++
 drivers/iio/magnetometer/Kconfig                   |  2 +-
 drivers/iio/magnetometer/ak8975.c                  | 78 ++++++++++++++++------
 3 files changed, 64 insertions(+), 20 deletions(-)

---
base-commit: 367b5c3d53e57d51a5878816804652963da90950
change-id: 20240805-ak09918-4a6cfef91c32

Best regards,

Signature · 1 line
Barnabás Czémán <[email protected]>