staging: iio: tsl2x7x: simplify tsl2x7x_prox_cal()
authorBrian Masney <masneyb@onstation.org>
Wed, 21 Mar 2018 10:29:05 +0000 (06:29 -0400)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 24 Mar 2018 13:35:15 +0000 (13:35 +0000)
commitbce075d0ec4b6155cf4f52a7e56aa2dd3b668679
tree600727da9f9ff95545ff86539ad0cbde89bd2712
parent85a7d0f7dbbb0f69c8f68dab8eb4a1d7b379cc29
staging: iio: tsl2x7x: simplify tsl2x7x_prox_cal()

tsl2x7x_prox_cal() would set the interrupt flag, and reset the device to
start doing the calibration routine. However, this did not actually
affect the readings since they are polled. This patch drops the interrupt
code.

This patch also drops the function tsl2x7x_prox_calculate() and removes
support for the standard deviation and min sample since those values
were not used.

Driver was tested using a TSL2772 hooked up to a Raspberry Pi 2. I
performed the following testing at various distances:

- Put hand in front of sensor and keep the sensor and hand stationary.
- Perform calibration 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 <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/staging/iio/light/tsl2x7x.c