linux/drivers/iio
Vlad Dogaru 59bd0427c0 iio: sx9500: optimize power usage
In the interest of lowering power usage, we only activate the proximity
channels and interrupts that we are currently using.

For raw reads, we activate the corresponding channel and the data ready
interrupt and wait for the interrupt to trigger.  If no interrupt is
available, we wait for the documented scan period, as specified in the
datasheet.

The following types of usage patterns may overlap:

* raw proximity reads (need a single data ready interrupt)
* trigger usage (needs data ready interrupts as long as active)
* proximity events (need near/far interrupts)
* triggered buffer reads (don't need any interrupts, but are usually
coupled with our own trigger.

To mitigate all possible patterns, we implement usage counting for all
the resources used: data ready interrupts, near/far interrupts and
individual channels.

The device enters sleep mode as documented in the data sheet when its
buffer, trigger and events are disabled, and no raw reads are currently
running.

Because of this new usage pattern, it is important that we give the
device a chance to perform an initial compensation for all its channels
at probe time.

Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2015-04-18 20:11:52 +01:00
..
accel iio: accel: kxcjk1013: allow using an external trigger 2015-04-09 14:20:02 +01:00
adc iio: adc: ti_am335x_adc: refactor DT parsing into a function 2015-04-09 15:13:16 +01:00
amplifiers iio: amplifiers: ad8366: Use right order for type specification 2015-01-01 12:16:57 +00:00
common iio: constify of_device_id array 2015-03-28 10:55:37 +00:00
dac iio: max517: Add support for MAX520 and MAX521 chips. 2015-03-28 10:57:34 +00:00
frequency iio: frequency: ad9523: Increase sleep time in ad9523_store_eeprom 2015-01-01 12:18:26 +00:00
gyro Merge 4.0-rc7 into staging-next 2015-04-07 11:03:02 +02:00
humidity IIO: si7020: Allocate correct amount of memory in devm_iio_device_alloc 2015-02-14 11:35:12 +00:00
imu Merge 4.0-rc7 into staging-next 2015-04-07 11:03:02 +02:00
light iio: ltr501: Add regmap support. 2015-04-18 19:57:46 +01:00
magnetometer iio: magnetometer: mag3110: Place driver on standby on error 2015-04-01 17:24:09 +02:00
orientation iio: hid-sensor-incl-3d: Introduce PM 2015-01-25 22:55:56 +00:00
pressure iio: pressure: add support for MS5611 pressure and temperature sensor 2015-03-15 11:47:46 +00:00
proximity iio: sx9500: optimize power usage 2015-04-18 20:11:52 +01:00
temperature iio: mlx90614: Fix duplicate const warning 2015-04-18 19:57:47 +01:00
trigger iio: trigger: Add a blank line after declarations 2014-12-26 12:15:36 +00:00
buffer_cb.c
iio_core_trigger.h
iio_core.h iio: Move buffer registration to the core 2014-12-12 12:28:31 +00:00
industrialio-buffer.c iio: add support for hardware fifo 2015-03-29 16:17:10 +01:00
industrialio-core.c iio: core: Introduce IIO_CHAN_INFO_CALIBEMISSIVITY 2015-04-09 15:03:05 +01:00
industrialio-event.c iio: core: Fix double free. 2015-03-14 18:54:14 +00:00
industrialio-trigger.c iio: Remove timestamp argument from iio_trigger_poll() and iio_trigger_poll_chained() 2014-06-14 16:25:59 +01:00
industrialio-triggered-buffer.c iio: kfifo: Remove unused argument in iio_kfifo_allocate 2014-12-26 11:20:38 +00:00
inkern.c First round of IIO new drivers, cleanups and functionality for the 3.20 cycle take 2 2015-01-21 10:13:37 +08:00
Kconfig Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2015-02-19 10:36:45 -08:00
kfifo_buf.c iio: add watermark logic to iio read and poll 2015-03-29 16:17:09 +01:00
Makefile