Skip to content

iio: accel: kxcjk-1013: Add support for KX023-1025

Stephan Gerhold linux-devicetree linux-iio lkml 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 2 repliesIn review
  2. v13 patches 6 repliesSuperseded

Changes in v2 from the cover letter

- Make register structs static (reported by kernel test robot)

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3dt-bindings: iio: kionix,kxcjk1013: Document kionix,kx023-1025Documentation/devicetree/bindings/iio/accel/kionix,kxcjk1013.yaml+1 -01 reply
2/3iio: accel: kxcjk-1013: Refactor configuration registers into structdrivers/iio/accel/kxcjk-1013.c+82 -420 replies
3/3iio: accel: kxcjk-1013: Add support for KX023-1025drivers/iio/accel/kxcjk-1013.c+93 -00 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchHans de GoedeRob Herring
1/3R-b A-b
2/3R-b
3/3R-b

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

Read the v2 thread

Cover letter [PATCH v2 0/3] iio: accel: kxcjk-1013: Add support for KX023-1025

KX023-1025 [1] is another accelerometer from Kionix that has lots of additional functionality compared to KXCJK-1013. It combines the motion interrupt functionality from KXCJK with the tap detection from KXTF9, plus a lot more other functionality.

This patch set does not add support for any of the extra functionality, but makes basic functionality work with the existing kxcjk-1013 driver.

At first, the register map for the KX023-1025 seems quite different from the other accelerometers supported by the kxcjk-1013. However, it turns out that at least most of the register bits still mean the same for KX023-1025.

This patch set refactors the kxcjk-1013 driver a little bit to get the register addresses from a chip-specific struct. The register bits can be re-used for all the different chips.

The KX023-1025 is used in several smartphones from Huawei. I tested these changes on a Huawei Ascend G7, someone else reported they also work fine on the Huawei Honor 5X (codename "kiwi").

[1]: https://kionixfs.azureedge.net/en/datasheet/KX023-1025%20Specifications%20Rev%2012.0.pdf
---
Changes in v2:
- Make register structs static (reported by kernel test robot)

Stephan Gerhold (3):
dt-bindings: iio: kionix,kxcjk1013: Document kionix,kx023-1025
iio: accel: kxcjk-1013: Refactor configuration registers into struct
iio: accel: kxcjk-1013: Add support for KX023-1025

 .../bindings/iio/accel/kionix,kxcjk1013.yaml  |   1 +
 drivers/iio/accel/kxcjk-1013.c                | 217 ++++++++++++++----
 2 files changed, 176 insertions(+), 42 deletions(-)
Signature · 1 line
2.31.1