linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/11] staging: iio: tsl2x7x: staging cleanups
@ 2018-03-21 10:29 Brian Masney
  2018-03-21 10:29 ` [PATCH 01/11] staging: iio: tsl2x7x: remove unnecessary code Brian Masney
                   ` (10 more replies)
  0 siblings, 11 replies; 23+ messages in thread
From: Brian Masney @ 2018-03-21 10:29 UTC (permalink / raw)
  To: jic23, linux-iio
  Cc: devel, lars, gregkh, linux-kernel, Jon.Brenner, pmeerw, knaack.h

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(-)

-- 
2.14.3

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2018-03-24 13:46 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-21 10:29 [PATCH 00/11] staging: iio: tsl2x7x: staging cleanups Brian Masney
2018-03-21 10:29 ` [PATCH 01/11] staging: iio: tsl2x7x: remove unnecessary code Brian Masney
2018-03-24 13:32   ` Jonathan Cameron
2018-03-21 10:29 ` [PATCH 02/11] staging: iio: tsl2x7x: correct interrupt handler trigger Brian Masney
2018-03-24 13:33   ` Jonathan Cameron
2018-03-21 10:29 ` [PATCH 03/11] staging: iio: tsl2x7x: no need to clear interrupt flag when getting lux Brian Masney
2018-03-24 13:34   ` Jonathan Cameron
2018-03-21 10:29 ` [PATCH 04/11] staging: iio: tsl2x7x: simplify tsl2x7x_prox_cal() Brian Masney
2018-03-24 13:35   ` Jonathan Cameron
2018-03-21 10:29 ` [PATCH 05/11] staging: iio: tsl2x7x: split out als and prox interrupt settings Brian Masney
2018-03-24 13:36   ` Jonathan Cameron
2018-03-21 10:29 ` [PATCH 06/11] staging: iio: tsl2x7x: make logging consistent and correct newlines Brian Masney
2018-03-24 13:39   ` Jonathan Cameron
2018-03-21 10:29 ` [PATCH 07/11] staging: iio: tsl2x7x: split out als and prox persistence settings Brian Masney
2018-03-24 13:40   ` Jonathan Cameron
2018-03-21 10:29 ` [PATCH 08/11] staging: iio: tsl2x7x: remove unused variables from tsl2x7x_get_lux() Brian Masney
2018-03-24 13:41   ` Jonathan Cameron
2018-03-21 10:29 ` [PATCH 09/11] staging: iio: tsl2x7x: remove ch0 and ch1 " Brian Masney
2018-03-24 13:42   ` Jonathan Cameron
2018-03-21 10:29 ` [PATCH 10/11] staging: iio: tsl2x7x: put local variables in reverse Christmas tree order Brian Masney
2018-03-24 13:44   ` Jonathan Cameron
2018-03-21 10:29 ` [PATCH 11/11] staging: iio: tsl2x7x: add copyright Brian Masney
2018-03-24 13:46   ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).