Re: [PATCH v8 1/2] Added AMS tsl2591 driver implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 16, 2021 at 8:49 PM Joe Sandom <joe.g.sandom@xxxxxxxxx> 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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux