If an object can be considered close to the device that has the proximity
sensor built in is hardware dependent. Allowing to configure the property via
device tree allows to export this device specific value to userspace via
ext_info. This is useful for e.g. iio-sensor-proxy.
This came up when adding proximity support to iio-sensor-proxy [1], [2], it is
not meant as a vcnl4000 thing but rather as something useful for other proximity
sensors too in the future.
I've not converted the vcnl4000 binding docs to yaml but can do so as part of
this series in a v2 if the approach makes sense.
[1]: https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/merge_requests/298
[2]: https://lore.kernel.org/linux-iio/[email protected]/
Guido Günther (2):
iio: vcnl4000: Export near level property for proximity sensor
dt-bindings: iio: light: vcnl4000: Add near-level
.../bindings/iio/light/vcnl4000.txt | 6 +++++
drivers/iio/light/vcnl4000.c | 26 +++++++++++++++++++
2 files changed, 32 insertions(+)
--
2.23.0