From a73811e7f614b0f10a47fc604b97c1c6e9a1bf55 Mon Sep 17 00:00:00 2001 From: mcc45tr Date: Wed, 2 Sep 2026 21:28:50 +0300 Subject: [PATCH] udev: select Nabu SDSP sensor ownership --- data/80-iio-sensor-proxy.rules | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/data/80-iio-sensor-proxy.rules b/data/80-iio-sensor-proxy.rules index fa8a4b3..fd5db71 100644 --- a/data/80-iio-sensor-proxy.rules +++ b/data/80-iio-sensor-proxy.rules @@ -18,11 +18,13 @@ SUBSYSTEM=="iio", TEST=="in_proximity_raw", ENV{IIO_SENSOR_PROXY_TYPE}+="iio-pol SUBSYSTEM=="iio", TEST=="in_proximity0_raw", ENV{IIO_SENSOR_PROXY_TYPE}+="iio-poll-proximity" SUBSYSTEM=="input", ENV{ID_INPUT_ACCELEROMETER}=="1", ENV{IIO_SENSOR_PROXY_TYPE}+="input-accel" -# Set the sensor type for all the types we recognise for SDSP/ADSP with libssc. -# Some devices expose the sensors via a separate SDSP while others re-use ADSP. -# These DSPs expose itself as /dev/fastrpc-* in the misc subsystem. -SUBSYSTEM=="misc", KERNEL=="fastrpc-adsp*", ENV{IIO_SENSOR_PROXY_TYPE}+="ssc-light ssc-compass" -SUBSYSTEM=="misc", KERNEL=="fastrpc-sdsp*", ENV{IIO_SENSOR_PROXY_TYPE}+="ssc-light ssc-compass" +# Nabu exposes its physical SSC sensors through SDSP. Do not advertise ADSP as +# a second source, otherwise two accelerometers can race for SensorProxy. +SUBSYSTEM=="misc", KERNEL=="fastrpc-adsp*", ENV{IIO_SENSOR_PROXY_TYPE}="" +SUBSYSTEM=="misc", KERNEL=="fastrpc-sdsp*", ENV{IIO_SENSOR_PROXY_TYPE}="ssc-accel ssc-light ssc-compass" + +# drv-ssc-accel reads mount_matrix directly from this FastRPC sysfs device. +# Keep the Device Tree value in the kernel instead of copying it through udev. ENV{IIO_SENSOR_PROXY_TYPE}=="", GOTO="iio_sensor_proxy_end" -- 2.55.0