Skip to content

staging: iio: tsl2x7x: staging cleanups

Brian Masney linux-iio lkml 1 version Applied

Status from this message: Applied.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 11 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/11staging: iio: tsl2x7x: remove unnecessary codedrivers/staging/iio/light/tsl2x7x.c+0 -61 reply
2/11staging: iio: tsl2x7x: correct interrupt handler triggerdrivers/staging/iio/light/tsl2x7x.c+1 -11 reply
3/11staging: iio: tsl2x7x: no need to clear interrupt flag when getting luxdrivers/staging/iio/light/tsl2x7x.c+0 -41 reply
4/11staging: iio: tsl2x7x: simplify tsl2x7x_prox_cal()drivers/staging/iio/light/tsl2x7x.c+15 -921 reply
5/11staging: iio: tsl2x7x: split out als and prox interrupt settingsdrivers/staging/iio/light/tsl2x7x.c drivers/staging/iio/light/tsl2x7x.h+24 -471 reply
6/11staging: iio: tsl2x7x: make logging consistent and correct newlinesdrivers/staging/iio/light/tsl2x7x.c+16 -261 reply
7/11staging: iio: tsl2x7x: split out als and prox persistence settingsdrivers/staging/iio/light/tsl2x7x.c drivers/staging/iio/light/tsl2x7x.h+17 -161 reply
8/11staging: iio: tsl2x7x: remove unused variables from tsl2x7x_get_lux()drivers/staging/iio/light/tsl2x7x.c+0 -111 reply
9/11staging: iio: tsl2x7x: remove ch0 and ch1 variables from tsl2x7x_get_lux()drivers/staging/iio/light/tsl2x7x.c+10 -111 reply
10/11staging: iio: tsl2x7x: put local variables in reverse Christmas tree orderdrivers/staging/iio/light/tsl2x7x.c+8 -131 reply
11/11staging: iio: tsl2x7x: add copyrightdrivers/staging/iio/light/tsl2x7x.c+3 -11 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

Here is another set of staging cleanups for the tsl2x7x driver. The driver is about ready to move out of staging. I want to test a few other things first before submitting a patch to move the driver out of staging.

High-level changes in this series:
- Interrupts and IIO events now work properly
. Split out interrupt and persistence variables into separate ALS and
proximity variables to improve code readability.
- Simplify code, remove unnecessary code, and improve code readability.

# How to test the interrupts

cd /sys/bus/iio/devices/iio:device0

echo 0 > events/in_intensity0_thresh_falling_value echo 512 > events/in_intensity0_thresh_rising_value echo 1 > events/in_intensity0_thresh_rising_en

# proximity0 already has threshold range at [0,512]
echo 1 > events/in_proximity0_thresh_rising_en

Run iio_event_monitor tsl2772 and verify that events are sent properly.

Question: Should I use in_intensity0_thresh_either_en instead of in_intensity0_thresh_{rising,falling}_en? The same goes for the proximity0. This is the current contents of the events/ directory:

in_intensity0_thresh_either_period
in_intensity0_thresh_falling_en
in_intensity0_thresh_falling_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
staging: iio: tsl2x7x: correct interrupt handler trigger
staging: iio: tsl2x7x: no need to clear interrupt flag when getting
lux
staging: iio: tsl2x7x: simplify tsl2x7x_prox_cal()
staging: iio: tsl2x7x: split out als and prox interrupt settings
staging: iio: tsl2x7x: make logging consistent and correct newlines
staging: iio: tsl2x7x: split out als and prox persistence settings
staging: iio: tsl2x7x: remove unused variables from tsl2x7x_get_lux()
staging: iio: tsl2x7x: remove ch0 and ch1 variables from

    tsl2x7x_get_lux()

staging: iio: tsl2x7x: put local variables in reverse Christmas tree
order
staging: iio: tsl2x7x: add copyright

 drivers/staging/iio/light/tsl2x7x.c | 300 ++++++++++--------------------------
 drivers/staging/iio/light/tsl2x7x.h |  16 +-
 2 files changed, 91 insertions(+), 225 deletions(-)
Signature · 1 line
2.14.3