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>
Showing
Please register or sign in to comment