]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
iio: light: us5182d: Add property for choosing default power mode
authorAdriana Reus <adriana.reus@intel.com>
Tue, 24 Nov 2015 10:59:48 +0000 (12:59 +0200)
committerJonathan Cameron <jic23@kernel.org>
Wed, 2 Dec 2015 18:42:03 +0000 (18:42 +0000)
commitc3304c212326cfcabb1faf6a0035d0c631778d5b
tree797b21c5146f0b6ee5eb721b4583cb199277c5f8
parent930cc0f39b07a830e6939c5634f9a310f306c4b1
iio: light: us5182d: Add property for choosing default power mode

This chip supports two power modes.
1. "one-shot" mode - the chip activates and executes one complete
conversion loop and then shuts itself down. This is the default mode
chosen for raw reads.
2. "continuous" mode - the chip takes continuous measurements.

Continuous mode is more expensive power-wise but may be more reliable.
Add a property so that if preferred, the default power mode for raw
reads can be set to continuous.
Separate one-shot enabling in a separate function that will be used
depending on the chosen power mode. Also create a function for
powering the chip on and off.

Signed-off-by: Adriana Reus <adriana.reus@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/light/us5182d.c