linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] iio: accel: kxcjk-1013: Add support for KX023-1025
@ 2021-05-11  9:54 Stephan Gerhold
  2021-05-11  9:54 ` [PATCH 1/3] dt-bindings: iio: kionix,kxcjk1013: Document kionix,kx023-1025 Stephan Gerhold
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Stephan Gerhold @ 2021-05-11  9:54 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Lars-Peter Clausen, Rob Herring, Robert Yang, linux-iio,
	devicetree, linux-kernel, Michał Mirosław,
	Srinivas Pandruvada, ~postmarketos/upstreaming, Hans de Goede,
	Stephan Gerhold

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

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(-)

-- 
2.31.1


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

end of thread, other threads:[~2021-05-13 16:13 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-11  9:54 [PATCH 0/3] iio: accel: kxcjk-1013: Add support for KX023-1025 Stephan Gerhold
2021-05-11  9:54 ` [PATCH 1/3] dt-bindings: iio: kionix,kxcjk1013: Document kionix,kx023-1025 Stephan Gerhold
2021-05-11  9:54 ` [PATCH 2/3] iio: accel: kxcjk-1013: Refactor configuration registers into struct Stephan Gerhold
2021-05-11 12:37   ` kernel test robot
2021-05-11 12:37   ` [RFC PATCH] iio: accel: kxcjk-1013: kxcjk1013_regs can be static kernel test robot
2021-05-11  9:54 ` [PATCH 3/3] iio: accel: kxcjk-1013: Add support for KX023-1025 Stephan Gerhold
2021-05-11 13:14   ` kernel test robot
2021-05-11 13:14   ` [RFC PATCH] iio: accel: kxcjk-1013: kx0231025_regs can be static kernel test robot
2021-05-11 10:44 ` [PATCH 0/3] iio: accel: kxcjk-1013: Add support for KX023-1025 Hans de Goede
2021-05-11 14:10   ` Jonathan Cameron
2021-05-11 14:28 ` Michał Mirosław
2021-05-11 14:38   ` Stephan Gerhold
2021-05-11 14:50     ` Michał Mirosław
2021-05-13 16:14       ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).