lkml.org 
[lkml]   [2023]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v4 4/7] iio: light: vcnl4000: add illuminance irq vcnl4040/4200
Mon, May 22, 2023 at 04:26:18PM +0200, Astrid Rost kirjoitti:
> Add support to configure ambient light sensor interrupts and threshold
> limits for vcnl4040 and vcnl4200. If an interrupt is detected an event
> will be pushed to the event interface.

...

> + case IIO_EV_DIR_RISING:
> + ret = i2c_smbus_write_word_data(
> + data->client, VCNL4040_ALS_THDH_LM, val);

Strange indentation.

> + break;
> + case IIO_EV_DIR_FALLING:
> + ret = i2c_smbus_write_word_data(
> + data->client, VCNL4040_ALS_THDL_LM, val);

Same.

> + break;

...

> + case IIO_PROXIMITY:
> + switch (dir) {
> + case IIO_EV_DIR_RISING:
> + ret = i2c_smbus_write_word_data(
> + data->client, VCNL4040_PS_THDH_LM, val);

Same.

> + break;
> + case IIO_EV_DIR_FALLING:
> + ret = i2c_smbus_write_word_data(
> + data->client, VCNL4040_PS_THDL_LM, val);

Same.

> + break;

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2023-05-29 00:45    [W:0.218 / U:1.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site