mbox series

[v2,0/2] iio: stk3310: Export near level property for proximity sensor

Message ID 20220420112540.91907-1-arnaud.ferraris@collabora.com (mailing list archive)
Headers show
Series iio: stk3310: Export near level property for proximity sensor | expand

Message

Arnaud Ferraris April 20, 2022, 11:25 a.m. UTC
Userspace tools like iio-sensor-proxy need to be instructed the value from
which they should consider an object is "near". This threshold can be
exported through the sysfs ABI based on the "proximity-near-level"
device-tree property.

This patchset implements this property for the stk3310 driver and adds the
necessary bits to export its value to userspace. It is based on similar
changes applied to the vcnl4000 and ltr501 drivers.

Changes in v2:
  - drop zero-assignment as the variable won't be modified if DT property
    is missing

Arnaud Ferraris (2):
  dt-bindings: iio: light: stk33xx: Add proximity-near-level
  iio: stk3310: Export near level property for proximity sensor

 .../bindings/iio/light/stk33xx.yaml           |  6 +++++
 drivers/iio/light/stk3310.c                   | 25 +++++++++++++++++++
 2 files changed, 31 insertions(+)

Comments

Jonathan Cameron April 24, 2022, 4:57 p.m. UTC | #1
On Wed, 20 Apr 2022 13:25:38 +0200
Arnaud Ferraris <arnaud.ferraris@collabora.com> wrote:

> Userspace tools like iio-sensor-proxy need to be instructed the value from
> which they should consider an object is "near". This threshold can be
> exported through the sysfs ABI based on the "proximity-near-level"
> device-tree property.
> 
> This patchset implements this property for the stk3310 driver and adds the
> necessary bits to export its value to userspace. It is based on similar
> changes applied to the vcnl4000 and ltr501 drivers.
> 
Series applied to the togreg branch of iio.git and pushed out as testing for
0-day to work it's magic.

Thanks,

Jonathan

> Changes in v2:
>   - drop zero-assignment as the variable won't be modified if DT property
>     is missing
> 
> Arnaud Ferraris (2):
>   dt-bindings: iio: light: stk33xx: Add proximity-near-level
>   iio: stk3310: Export near level property for proximity sensor
> 
>  .../bindings/iio/light/stk33xx.yaml           |  6 +++++
>  drivers/iio/light/stk3310.c                   | 25 +++++++++++++++++++
>  2 files changed, 31 insertions(+)
>