lkml.org 
[lkml]   [2021]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v8 1/2] Added AMS tsl2591 driver implementation
On Fri, Apr 16, 2021 at 8:49 PM Joe Sandom <joe.g.sandom@gmail.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

\
 
 \ /
  Last update: 2021-04-17 14:51    [W:0.277 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site