summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-04-26 08:12:25 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-04-26 08:12:25 -0700
commitd5cef008e95ffdaf457e38254e67d145a927df96 (patch)
tree8ed3f611c886af4276d6fb493e62d927d8f6946d /include
parent58612c608f41a24c58ce082986da3e30ce2fff37 (diff)
parentea7e586bdd331fd6fba2b6f9fd3777928c2814d8 (diff)
Merge tag 'iio-for-3.16a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Jonathan writes: First round of IIO new driver, functionality and cleanups for the 3.16 cycle. New device support * AS3935 Lightning Sensor * MCP3426/7/8 support added to the existing MCP3422 ADC driver * AK8963 support in the AK8975 driver * MPU6500 support in the MPU6050 driver (the functionality that is different is mostly not supported yet in either part). Staging Graduations * AD799x ADC New functionality * ACPI enumeration for the ak8975 driver Cleanup / tweaks * Use snprintf as a matter of good practice in a few additional places. * Document *_mean_raw attributes. These have been there a while, but were undocumented. * Add an in kernel interface to get the mean values. * Bug in the length of the event info mask that by coincidence wasn't yet actually causing any problems. * itg3000 drop an unreachable return statement. * spear_adc cleanups (heading for a staging graduation but a few more issues showed up in the review of these patches). * Exynos ADC dependencies changed so it is only built when Exynos is present or COMPILE_TEST and OF are set. * tsl2583 cleanups. * Some cut and paste typos in the comments of various drivers still in staging. * Couple of minor improvements to the ST sensor drivers.
Diffstat (limited to 'include')
-rw-r--r--include/linux/iio/common/st_sensors.h4
-rw-r--r--include/linux/iio/consumer.h13
2 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/iio/common/st_sensors.h b/include/linux/iio/common/st_sensors.h
index 3c005eb3a0a4..96f51f0e0096 100644
--- a/include/linux/iio/common/st_sensors.h
+++ b/include/linux/iio/common/st_sensors.h
@@ -269,6 +269,10 @@ int st_sensors_set_enable(struct iio_dev *indio_dev, bool enable);
int st_sensors_set_axis_enable(struct iio_dev *indio_dev, u8 axis_enable);
+void st_sensors_power_enable(struct iio_dev *indio_dev);
+
+void st_sensors_power_disable(struct iio_dev *indio_dev);
+
int st_sensors_set_odr(struct iio_dev *indio_dev, unsigned int odr);
int st_sensors_set_dataready_irq(struct iio_dev *indio_dev, bool enable);
diff --git a/include/linux/iio/consumer.h b/include/linux/iio/consumer.h
index 2752b1fd12be..651f9a0e2765 100644
--- a/include/linux/iio/consumer.h
+++ b/include/linux/iio/consumer.h
@@ -123,6 +123,19 @@ int iio_read_channel_raw(struct iio_channel *chan,
int *val);
/**
+ * iio_read_channel_average_raw() - read from a given channel
+ * @chan: The channel being queried.
+ * @val: Value read back.
+ *
+ * Note raw reads from iio channels are in adc counts and hence
+ * scale will need to be applied if standard units required.
+ *
+ * In opposit to the normal iio_read_channel_raw this function
+ * returns the average of multiple reads.
+ */
+int iio_read_channel_average_raw(struct iio_channel *chan, int *val);
+
+/**
* iio_read_channel_processed() - read processed value from a given channel
* @chan: The channel being queried.
* @val: Value read back.