mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
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>
This commit is contained in:
committed by
Jonathan Cameron
parent
744f4990ee
commit
94a39f2c44
@@ -60,6 +60,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_ev_type_text[] = {
|
||||
@@ -175,6 +176,7 @@ static bool event_is_known(struct iio_event_data *event)
|
||||
case IIO_PHASE:
|
||||
case IIO_MASSCONCENTRATION:
|
||||
case IIO_DELTA_ANGL:
|
||||
case IIO_DELTA_VELOCITY:
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user