[PATCH 00/12] staging cleanups

2018-03-03 Thread Brian Masney
supported devices. The rest of the patches are not that interesting and either reduce duplicate code, add error handling, or other minor cosmetic changes. Brian Masney (12): staging: iio: tsl2x7x: remove power functions from tsl2X7X_platform_data staging: iio: tsl2x7x: add common function for

[PATCH 12/12] staging: iio: tsl2x7x: make proximity sensor function correctly

2018-03-03 Thread Brian Masney
0 into those bits. Verified that the proximity sensor now works correctly on a TSL2771 hooked up to a Raspberry Pi 2. Signed-off-by: Brian Masney --- drivers/staging/iio/light/tsl2x7x.c | 25 ++--- drivers/staging/iio/light/tsl2x7x.h | 2 ++ 2 files changed, 16 insertions

[PATCH 03/12] staging: iio: tsl2x7x: add common function for reading chip status

2018-03-03 Thread Brian Masney
: Brian Masney --- drivers/staging/iio/light/tsl2x7x.c | 40 ++--- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/drivers/staging/iio/light/tsl2x7x.c b/drivers/staging/iio/light/tsl2x7x.c index c02db03ef369..6bb622816660 100644 --- a/drivers/staging

[PATCH 07/11] staging: iio: tsl2x7x: split out als and prox persistence settings

2018-03-21 Thread Brian Masney
-by: Brian Masney --- drivers/staging/iio/light/tsl2x7x.c | 24 +++- drivers/staging/iio/light/tsl2x7x.h | 9 ++--- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/drivers/staging/iio/light/tsl2x7x.c b/drivers/staging/iio/light/tsl2x7x.c index 07ce3076a05d

[PATCH 02/11] staging: iio: tsl2x7x: correct interrupt handler trigger

2018-03-21 Thread Brian Masney
h, direction: either ... Event: time: 1478193463020270185, type: illuminance, channel: 0, evtype: thresh, direction: either ... Signed-off-by: Brian Masney --- drivers/staging/iio/light/tsl2x7x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/iio/light/ts

[PATCH 00/11] staging: iio: tsl2x7x: staging cleanups

2018-03-21 Thread Brian Masney
alling_value in_intensity0_thresh_rising_en in_intensity0_thresh_rising_value in_proximity0_thresh_either_period in_proximity0_thresh_falling_en in_proximity0_thresh_falling_value in_proximity0_thresh_rising_en in_proximity0_thresh_rising_value Brian Masney (11): staging: iio: tsl2x7x: remove unnecessary code

[PATCH 01/11] staging: iio: tsl2x7x: remove unnecessary code

2018-03-21 Thread Brian Masney
ock(), but that is no longer the case. This patch also removes a comment that is no longer relevant about returning the last sample. Signed-off-by: Brian Masney --- drivers/staging/iio/light/tsl2x7x.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/iio/light/tsl2x7x.c

[PATCH 03/11] staging: iio: tsl2x7x: no need to clear interrupt flag when getting lux

2018-03-21 Thread Brian Masney
tsl2x7x_get_lux() does not need to clear the interrupt flag when querying the ALS. The interrupt flag is cleared in tsl2x7x_event_handler(). This patches removes the unnecessary code. Signed-off-by: Brian Masney --- drivers/staging/iio/light/tsl2x7x.c | 4 1 file changed, 4 deletions

[PATCH 06/11] staging: iio: tsl2x7x: make logging consistent and correct newlines

2018-03-21 Thread Brian Masney
This patch updates all of the logging commands so that they are consistent with the other messages, includes __func__ in the message, and all of the messages include newlines. This patch also removes some debug log messages. Signed-off-by: Brian Masney --- Changes since v1: - Remove some debug

[PATCH 10/11] staging: iio: tsl2x7x: put local variables in reverse Christmas tree order

2018-03-21 Thread Brian Masney
This patch ensures that all of the local variable declarations are in reverse Christmas tree order where possible to increase code readability. Signed-off-by: Brian Masney --- drivers/staging/iio/light/tsl2x7x.c | 21 - 1 file changed, 8 insertions(+), 13 deletions(-) diff

[PATCH 05/11] staging: iio: tsl2x7x: split out als and prox interrupt settings

2018-03-21 Thread Brian Masney
. Signed-off-by: Brian Masney --- drivers/staging/iio/light/tsl2x7x.c | 64 - drivers/staging/iio/light/tsl2x7x.h | 7 ++-- 2 files changed, 24 insertions(+), 47 deletions(-) diff --git a/drivers/staging/iio/light/tsl2x7x.c b/drivers/staging/iio/light/tsl2x7x.c

[PATCH 08/11] staging: iio: tsl2x7x: remove unused variables from tsl2x7x_get_lux()

2018-03-21 Thread Brian Masney
tsl2x7x_get_lux() has a ch0lux and ch1lux variables that are not used so this patch removes them. Signed-off-by: Brian Masney --- drivers/staging/iio/light/tsl2x7x.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/drivers/staging/iio/light/tsl2x7x.c b/drivers/staging/iio/light

[PATCH 11/11] staging: iio: tsl2x7x: add copyright

2018-03-21 Thread Brian Masney
Add Brian Masney's copyright and to the list of module authors for all of the staging cleanups. This patch also update's Jon Brenner's current work email address since AMS now owns TAOS. Signed-off-by: Brian Masney --- drivers/staging/iio/light/tsl2x7x.c | 4 +++- 1 file change

[PATCH 04/11] staging: iio: tsl2x7x: simplify tsl2x7x_prox_cal()

2018-03-21 Thread Brian Masney
routine. - Run iio_event_monitor. - Verify that a proximity event is triggered when my hand comes anywhere between the sensor and where I performed the calibration routine. Signed-off-by: Brian Masney --- drivers/staging/iio/light/tsl2x7x.c | 107 +--- 1 file

[PATCH 09/11] staging: iio: tsl2x7x: remove ch0 and ch1 variables from tsl2x7x_get_lux()

2018-03-21 Thread Brian Masney
Remove the ch0 and ch1 variables from tsl2x7x_get_lux() and write those values directly into the chip->als_cur_info.als_ch0 and chip->als_cur_info.als_ch01 variables. Signed-off-by: Brian Masney --- drivers/staging/iio/light/tsl2x7x.c | 21 ++--- 1 file changed, 10 inse

[PATCH 0/4] staging: iio: tsl2x7x: move out of staging

2018-03-24 Thread Brian Masney
Here is a patch series to move the tsl2x7x driver out of staging and into mainline. Driver was tested using various TSL2X7X devices on a Raspberry Pi 2. Datasheet for the TSl2772: https://ams.com/eng/content/download/291503/1066377/file/TSL2772_DS000181_2-00.pdf Brian Masney (4): staging: iio

[PATCH 4/4] staging: iio: tsl2x7x: move out of staging

2018-03-24 Thread Brian Masney
Move the tsl2x7x driver out of staging and into mainline. Signed-off-by: Brian Masney --- Note: I intentionally ran git format-patch with --no-renames since Jonathan likes to see the whole files in the email body for staging graduation patches. The #include "tsl2x7x.h" was changed t

[PATCH 3/4] staging: iio: tsl2x7x: use either direction for IIO_EV_INFO_{ENABLE, PERIOD}

2018-03-24 Thread Brian Masney
: in_intensity0_thresh_either_en in_intensity0_thresh_either_period in_intensity0_thresh_falling_value in_intensity0_thresh_rising_value in_proximity0_thresh_either_en in_proximity0_thresh_either_period in_proximity0_thresh_falling_value in_proximity0_thresh_rising_value Signed-off-by: Brian Masney

[PATCH 1/4] staging: iio: tsl2x7x: use auto increment I2C protocol

2018-03-24 Thread Brian Masney
be found at https://www.i2c-bus.org/auto-increment/. Signed-off-by: Brian Masney --- drivers/staging/iio/light/tsl2x7x.c | 100 1 file changed, 67 insertions(+), 33 deletions(-) diff --git a/drivers/staging/iio/light/tsl2x7x.c b/drivers/staging/iio/light

[PATCH 2/4] staging: iio: tsl2x7x: move IIO_CHAN_INFO_CALIB{SCALE, BIAS} to IIO_LIGHT channel

2018-03-24 Thread Brian Masney
in_intensity0_raw in_intensity1_raw in_proximity0_calibrate in_proximity0_calibscale in_proximity0_calibscale_available in_proximity0_raw name of_node power subsystem uevent Signed-off-by: Brian Masney --- drivers/staging/iio/light/tsl2x7x.c | 24 1 file changed, 12 insertions(+), 12

<    1   2   3   4