iio: adc: cc10001: Power-up the ADC at probe time when used remotely
authorNaidu Tellapati <naidu.tellapati@imgtec.com>
Thu, 7 May 2015 21:24:02 +0000 (18:24 -0300)
committerJonathan Cameron <jic23@kernel.org>
Sun, 14 Jun 2015 11:21:22 +0000 (12:21 +0100)
commitae35496230bc792fa76505ab7fcee694c7f7d523
tree2741f932bcb500ac79d2382e93b6cafb79fa032b
parenteb2c9ce2cc938d7d39fc06430519bf0fc5004566
iio: adc: cc10001: Power-up the ADC at probe time when used remotely

The ADC is typically shared with remote CPUs not running Linux.
However, there is only one register to power-up/power-down. Remote CPUs
aren't able to power-up the ADC, and rely in Linux doing it instead.

This commit uses the adc-reserved-channels devicetree property to
distinguish shared usage. In this case, the ADC is powered up at
probe time.

If the ADC is used only by the CPU running Linux, power-up/down
at runtime, only when neeeded.

Signed-off-by: Naidu Tellapati <naidu.tellapati@imgtec.com>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@imgtec.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/adc/cc10001_adc.c