[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VcHuAUDB59ZDJQAQgugQOwASM6K+sQ9uPAR7jMyOcdZCQ@mail.gmail.com>
Date: Sun, 22 Mar 2020 02:21:02 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Guido Günther <agx@...xcpu.org>
Cc: Tomas Novotny <tomas@...otny.cz>,
Jonathan Cameron <jic23@...nel.org>,
Hartmut Knaack <knaack.h@....de>,
Lars-Peter Clausen <lars@...afoo.de>,
Peter Meerwald-Stadler <pmeerw@...erw.net>,
"Angus Ainslie (Purism)" <angus@...ea.ca>,
Marco Felsch <m.felsch@...gutronix.de>,
Thomas Gleixner <tglx@...utronix.de>,
linux-iio <linux-iio@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
devicetree <devicetree@...r.kernel.org>
Subject: Re: [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@...xcpu.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
Powered by blists - more mailing lists