Enhancement: Consider using iio-sensor-proxy for rotation and proximity monitoring


For basic sensors (proximity and accelerometer), sxmo currently queries sysfs directly.

While this works for the majority of devices, it will not for a few 'important' devices, notably those based on SDM845 SoC (think Oneplus 6/6T), because their sensors are not exposed over the kernel's iio framework, and it does not appear that this will happen in the very near future due to the way those sensors are hooked on the SoC. However, there are already WIP patches to support them in iio-sensor-proxy [1].

Less importantly, the Nokia N900 (which also has basic support in sxmo) has a proximity sensor that is also not registered on the iio bus, but in the input framework. While writing a driver to expose it over iio would be somewhat trivial, the kernel maintainers recommend that this particular sensor really belongs in input subsystem [2]. I currently have WIP patches for supporting it in iio-sensor-proxy as well [3].

Thus, it might be worthwhile for sxmo to consider switching to iio-sensor-proxy at some point too.

[1] https://gitlab.com/dylanvanassche/iio-sensor-proxy/-/commits/ssc/ [2] https://lore.kernel.org/linux-iio/ZVevR_ajeB1jfDS9@tp440p.steeds.sam/T/#u [3] https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/merge_requests/375

Assigned to
3 months ago
3 months ago
No labels applied.

~earboxer 3 months ago

Alternatively for SDM845 devices, we can use libssc's ssccli with these patches: https://codeberg.org/DylanVanAssche/libssc/pulls/22

and a cleaned up version of this change to sxmo_proximitylock.sh


Register here or Log in to comment, or comment via email.