lkml.org 
[lkml]   [2020]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 3/4] iio: vcnl4000: Export near level property for proximity sensor
On Mon, Mar 16, 2020 at 7:47 PM Guido Günther <agx@sigxcpu.org> wrote:
>
> When an object can be considered close to the sensor is hardware
> dependent. Allowing to configure the property via device tree
> allows to configure this device specific value.
>
> This is useful for e.g. iio-sensor-proxy to indicate to userspace
> if an object is close to the sensor.

...

> @@ -342,6 +343,26 @@ static const struct vcnl4000_chip_spec vcnl4000_chip_spec_cfg[] = {
> },
> };
>

> +

No need for this blank line.

> +static ssize_t vcnl4000_read_near_level(struct iio_dev *indio_dev,
> + uintptr_t priv,
> + const struct iio_chan_spec *chan,
> + char *buf)

...

> + if (device_property_read_u32(&client->dev, "near-level",
> + &data->near_level) < 0)

It doesn't return > 0. So, you may drop that and put everything to one
line I think.

> + data->near_level = 0;

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2020-03-22 01:21    [W:0.074 / U:2.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site