support proximity sensors exposed via input subsystem
Although not too common, there are proximity sensors that are mapped as input devices, emitting the SW_FRONT_PROXIMITY
key code defined at https://github.com/torvalds/linux/blob/master/include/uapi/linux/input-event-codes.h#L918
At least two phones have this setup, Google/Asus Nexus 7 and Nokia N900 (which I want to use). The sensors are connected over gpio and have binary states, where 0 = far, and 1 = near. Also some Chromebooks have something similar, going by https://lore.kernel.org/all/20201205004709.3126266-1-swboyd@chromium.org/
Could iio-sensor-proxy
support them? I suspect it would need to be modeled similar to drv-input-accel.c
? Although i don't really have C knowledge, I could possibly try to write it. I would appreciate some pointers and suggestions, of course :-)