diff options
author | Lee Jones | 2013-09-16 17:02:00 +0100 |
---|---|---|
committer | Jonathan Cameron | 2013-09-23 20:17:54 +0100 |
commit | 774487611c949e6d194877e7147f6eeeec092b53 (patch) | |
tree | d6abcf6697bb6186f798f5207d599f0abf27b88b /include | |
parent | 3ffdea3feca9e2c95c2e93e217d77c9c368f747a (diff) |
iio: pressure-core: st: Provide support for the Vdd power supply
The power to some of the sensors are controlled by regulators. In most
cases these are 'always on', but if not they will fail to work until
the regulator is enabled using the relevant APIs. This patch allows for
the Vdd power supply to be specified by either platform data or Device
Tree.
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/iio/common/st_sensors.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/iio/common/st_sensors.h b/include/linux/iio/common/st_sensors.h index e732fda6c8e6..968b84e5f380 100644 --- a/include/linux/iio/common/st_sensors.h +++ b/include/linux/iio/common/st_sensors.h @@ -16,6 +16,7 @@ #include <linux/irqreturn.h> #include <linux/iio/trigger.h> #include <linux/bitops.h> +#include <linux/regulator/consumer.h> #include <linux/platform_data/st_sensors_pdata.h> @@ -201,6 +202,7 @@ struct st_sensors { * @trig: The trigger in use by the core driver. * @sensor: Pointer to the current sensor struct in use. * @current_fullscale: Maximum range of measure by the sensor. + * @vdd: Pointer to sensor's Vdd power supply * @enabled: Status of the sensor (false->off, true->on). * @multiread_bit: Use or not particular bit for [I2C/SPI] multiread. * @buffer_data: Data used by buffer part. @@ -216,6 +218,7 @@ struct st_sensor_data { struct iio_trigger *trig; struct st_sensors *sensor; struct st_sensor_fullscale_avl *current_fullscale; + struct regulator *vdd; bool enabled; bool multiread_bit; |