[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VeSNDdY_jUsgy06mLpLVXnuyw3NjvxJBN6D-cxV5-VvUg@mail.gmail.com>
Date: Sat, 17 Apr 2021 15:50:16 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Joe Sandom <joe.g.sandom@...il.com>
Cc: Jonathan Cameron <jic23@...nel.org>,
Lars-Peter Clausen <lars@...afoo.de>,
Peter Meerwald-Stadler <pmeerw@...erw.net>,
Rob Herring <robh+dt@...nel.org>,
linux-iio <linux-iio@...r.kernel.org>,
devicetree <devicetree@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v8 1/2] Added AMS tsl2591 driver implementation
On Fri, Apr 16, 2021 at 8:49 PM Joe Sandom <joe.g.sandom@...il.com> wrote:
>
> Driver implementation for AMS/TAOS tsl2591 ambient light sensor.
>
> This driver supports configuration via device tree and sysfs.
> Supported channels for raw infrared light intensity,
> raw combined light intensity and illuminance in lux.
> The driver additionally supports iio events on lower and
> upper thresholds.
>
> This is a very-high sensitivity light-to-digital converter that
> transforms light intensity into a digital signal.
Hmm... It's v8 and the subject line is wrongly formatted.
Please add the corresponding prefix "iio: light: ..."
Otherwise it's in very good shape.
...
> +/* TSL2591 enable register definitions */
> +#define TSL2591_PWR_ON 0x01
> +#define TSL2591_PWR_OFF 0x00
> +#define TSL2591_ENABLE_ALS 0x02
> +#define TSL2591_ENABLE_ALS_INT 0x10
> +#define TSL2591_ENABLE_SLEEP_INT 0x40
> +#define TSL2591_ENABLE_NP_INT 0x80
Is it a bitfield?
...
> + als_lower_l = als_lower_threshold;
>> 0, but it's up to you.
> + als_lower_h = als_lower_threshold >> 8;
...
> + als_upper_l = als_upper_threshold;
> + als_upper_h = als_upper_threshold >> 8;
Ditto.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists