summaryrefslogtreecommitdiffstats
path: root/drivers/iio/industrialio-core.c
diff options
context:
space:
mode:
authorRamona Bolboaca <ramona.bolboaca@analog.com>2023-08-08 10:50:58 +0300
committerJonathan Cameron <jonathan.cameron@huawei.com>2023-09-12 10:42:03 +0100
commit94a39f2c443b3fc5efe31a68502991020eefa3d2 (patch)
treeee15d117b44fe8b018af872b514386118d3df417 /drivers/iio/industrialio-core.c
parent744f4990ee0519ebef21fa7db094240bbaf3d746 (diff)
downloadlinux-stable-94a39f2c443b3fc5efe31a68502991020eefa3d2.tar.gz
linux-stable-94a39f2c443b3fc5efe31a68502991020eefa3d2.tar.bz2
linux-stable-94a39f2c443b3fc5efe31a68502991020eefa3d2.zip
iio: Add IIO_DELTA_VELOCITY channel type
The delta velocity is defined as a piece-wise integration of acceleration data. The delta velocity represents the linear velocity change between two consecutive measurements and it is measured in m / s (meters per second). In order to track the total linear velocity change during a desired period of time, simply sum-up the delta velocity samples acquired during that time. IIO currently does not offer a suitable channel type for this type of measurements hence this patch adds it. Signed-off-by: Ramona Bolboaca <ramona.bolboaca@analog.com> Reviewed-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20230808075059.645525-3-ramona.bolboaca@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/industrialio-core.c')
-rw-r--r--drivers/iio/industrialio-core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
index 11a65030186d..2ea0bf08caf3 100644
--- a/drivers/iio/industrialio-core.c
+++ b/drivers/iio/industrialio-core.c
@@ -91,6 +91,7 @@ static const char * const iio_chan_type_name_spec[] = {
[IIO_PHASE] = "phase",
[IIO_MASSCONCENTRATION] = "massconcentration",
[IIO_DELTA_ANGL] = "deltaangl",
+ [IIO_DELTA_VELOCITY] = "deltavelocity",
};
static const char * const iio_modifier_names[] = {