diff options
author | Stephan Gerhold <stephan@gerhold.net> | 2021-05-11 16:24:02 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2021-05-17 13:54:25 +0100 |
commit | c630c1768522d5728e51470ea4f292a35919bb6d (patch) | |
tree | 256b45bc2e80da543887a18538dca040634c18ab /tools | |
parent | ae4467f6884ea16f6338295e9951eae3544aac87 (diff) | |
download | linux-c630c1768522d5728e51470ea4f292a35919bb6d.tar.bz2 |
iio: accel: kxcjk-1013: Add support for KX023-1025
The KX023-1025 accelerometer [1] seems to be some mixture of
KXCJK and KXTF9. It has the motion interrupt functionality from KXCJK
but also the tap detection from KXTF9, and a lot more functionality.
The configuration register map seems fairly different at first,
but actually all register bits used by the kxcjk-1013 driver are
available at the same bit positions on KX023-1025. It's just quite
misleading because:
1. The registers have entirely different names and are at different
addresses, but the bits are mostly named the same (and mean the same).
2. There are many more registers and bits used that are reserved on KXCJK
to enable additional functionality.
Ignoring all additionally available functionality for now, the KX023
works just fine after setting up the struct with the correct register
addresses. The only difference that needs to be handled additionally
is that the KX023 supports two configurable interrupt lines (INT1/2).
For now only INT1 is supported so we route all interrupts used by
the driver there.
[1]: https://kionixfs.azureedge.net/en/datasheet/KX023-1025%20Specifications%20Rev%2012.0.pdf
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions