Commit faaa4495 authored by Irina Tirdea's avatar Irina Tirdea Committed by Jonathan Cameron

iio: core: Introduce IIO_CHAN_INFO_OVERSAMPLING_RATIO

Some magnetometers can perform a number of repetitions in HW
for each measurement to increase accuracy. One example is
Bosch BMC150:
http://ae-bst.resource.bosch.com/media/products/dokumente/bmc150/BST-BMC150-DS000-04.pdf.

Introduce an interface to set the oversampling ratio
for these devices.
Signed-off-by: default avatarIrina Tirdea <irina.tirdea@intel.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 42a95584
...@@ -1375,3 +1375,15 @@ Description: ...@@ -1375,3 +1375,15 @@ Description:
The emissivity ratio of the surface in the field of view of the The emissivity ratio of the surface in the field of view of the
contactless temperature sensor. Emissivity varies from 0 to 1, contactless temperature sensor. Emissivity varies from 0 to 1,
with 1 being the emissivity of a black body. with 1 being the emissivity of a black body.
What: /sys/bus/iio/devices/iio:deviceX/in_magn_x_oversampling_ratio
What: /sys/bus/iio/devices/iio:deviceX/in_magn_y_oversampling_ratio
What: /sys/bus/iio/devices/iio:deviceX/in_magn_z_oversampling_ratio
KernelVersion: 4.2
Contact: linux-iio@vger.kernel.org
Description:
Hardware applied number of measurements for acquiring one
data point. The HW will do <type>[_name]_oversampling_ratio
measurements and return the average value as output data. Each
value resulted from <type>[_name]_oversampling_ratio measurements
is considered as one sample for <type>[_name]_sampling_frequency.
...@@ -129,6 +129,7 @@ static const char * const iio_chan_info_postfix[] = { ...@@ -129,6 +129,7 @@ static const char * const iio_chan_info_postfix[] = {
[IIO_CHAN_INFO_DEBOUNCE_COUNT] = "debounce_count", [IIO_CHAN_INFO_DEBOUNCE_COUNT] = "debounce_count",
[IIO_CHAN_INFO_DEBOUNCE_TIME] = "debounce_time", [IIO_CHAN_INFO_DEBOUNCE_TIME] = "debounce_time",
[IIO_CHAN_INFO_CALIBEMISSIVITY] = "calibemissivity", [IIO_CHAN_INFO_CALIBEMISSIVITY] = "calibemissivity",
[IIO_CHAN_INFO_OVERSAMPLING_RATIO] = "oversampling_ratio",
}; };
/** /**
......
...@@ -44,6 +44,7 @@ enum iio_chan_info_enum { ...@@ -44,6 +44,7 @@ enum iio_chan_info_enum {
IIO_CHAN_INFO_DEBOUNCE_COUNT, IIO_CHAN_INFO_DEBOUNCE_COUNT,
IIO_CHAN_INFO_DEBOUNCE_TIME, IIO_CHAN_INFO_DEBOUNCE_TIME,
IIO_CHAN_INFO_CALIBEMISSIVITY, IIO_CHAN_INFO_CALIBEMISSIVITY,
IIO_CHAN_INFO_OVERSAMPLING_RATIO,
}; };
enum iio_shared_by { enum iio_shared_by {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment