From a2c96f974db80757f6c4d585a5cd5e70bdd6dd40 Mon Sep 17 00:00:00 2001 From: Jason Zhang Date: Tue, 7 Jun 2022 11:50:56 +0800 Subject: [PATCH] iio: Add channels for LSM6DSR sensor HUB Add new channels types support for LSM6DSR sensor HUB: * IIO_SIGN_MOTION * IIO_STEP_DETECTOR * IIO_STEP_COUNTER * IIO_TILT * IIO_TAP * IIO_TAP_TAP * IIO_WRIST_TILT_GESTURE * IIO_GESTURE Signed-off-by: Jason Zhang Change-Id: I8f3f2feae32b94ad6802a9a359ec11ab94a96816 --- drivers/iio/industrialio-core.c | 10 ++++++++++ include/uapi/linux/iio/types.h | 10 ++++++++++ tools/iio/iio_event_monitor.c | 10 ++++++++++ 3 files changed, 30 insertions(+) diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c index 261d3b17edc9..fc377e585170 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio/industrialio-core.c @@ -87,6 +87,16 @@ static const char * const iio_chan_type_name_spec[] = { [IIO_POSITIONRELATIVE] = "positionrelative", [IIO_PHASE] = "phase", [IIO_MASSCONCENTRATION] = "massconcentration", +#ifdef CONFIG_NO_GKI + [IIO_SIGN_MOTION] = "signmotion", + [IIO_STEP_DETECTOR] = "stepdetector", + [IIO_STEP_COUNTER] = "stepcounter", + [IIO_TILT] = "tilt", + [IIO_TAP] = "tap", + [IIO_TAP_TAP] = "taptap", + [IIO_WRIST_TILT_GESTURE] = "wristtiltgesture", + [IIO_GESTURE] = "gesture", +#endif }; static const char * const iio_modifier_names[] = { diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h index 21be68dace1d..860ffcd73e4e 100644 --- a/include/uapi/linux/iio/types.h +++ b/include/uapi/linux/iio/types.h @@ -47,6 +47,16 @@ enum iio_chan_type { IIO_POSITIONRELATIVE, IIO_PHASE, IIO_MASSCONCENTRATION, +#ifdef CONFIG_NO_GKI + IIO_SIGN_MOTION, + IIO_STEP_DETECTOR, + IIO_STEP_COUNTER, + IIO_TILT, + IIO_TAP, + IIO_TAP_TAP, + IIO_WRIST_TILT_GESTURE, + IIO_GESTURE, +#endif }; enum iio_modifier { diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c index 5504e5661130..d491b02bb78e 100644 --- a/tools/iio/iio_event_monitor.c +++ b/tools/iio/iio_event_monitor.c @@ -58,6 +58,16 @@ static const char * const iio_chan_type_name_spec[] = { [IIO_POSITIONRELATIVE] = "positionrelative", [IIO_PHASE] = "phase", [IIO_MASSCONCENTRATION] = "massconcentration", +#ifdef CONFIG_NO_GKI + [IIO_SIGN_MOTION] = "signmotion", + [IIO_STEP_DETECTOR] = "stepdetector", + [IIO_STEP_COUNTER] = "stepcounter", + [IIO_TILT] = "tilt", + [IIO_TAP] = "tap", + [IIO_TAP_TAP] = "taptap", + [IIO_WRIST_TILT_GESTURE] = "wristtiltgesture", + [IIO_GESTURE] = "gesture", +#endif }; static const char * const iio_ev_type_text[] = {