]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
staging:iio:ad7291: Rework regulator handling
authorLars-Peter Clausen <lars@metafoo.de>
Fri, 14 Jun 2013 15:58:00 +0000 (16:58 +0100)
committerJonathan Cameron <jic23@kernel.org>
Fri, 14 Jun 2013 20:55:17 +0000 (21:55 +0100)
commit1df9d1d4a1cb666042c3217aef6a6dc38eed1de0
tree4ba8780c196acc46f1612553865d4fafa84865b5
parent88198d2b4238b8f711918abe5e2b9bd7efc7c775
staging:iio:ad7291: Rework regulator handling

Add platform_data for the driver which allows to specify whether an external
reference voltage is used or not. It is not possible to use the return value of
regulator_get() for this since the regulator framework is able to return a dummy
regulator in case no regulator has been specified. In this case the driver will
always get a valid regulator, no matter if it has been specified or not.  Also
make the regulator non-optional if platform_data states that an external
reference voltage should be used.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/adc/ad7291.c
drivers/staging/iio/adc/ad7291.h [new file with mode: 0644]