From 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5 Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Tue, 22 Oct 2024 10:36:11 +0000 Subject: [PATCH] 修改4g拨号为QMI,需要在系统里后台执行quectel-CM --- kernel/tools/iio/iio_event_monitor.c | 40 +++++++++++++++++++++++++++++++++++----- 1 files changed, 35 insertions(+), 5 deletions(-) diff --git a/kernel/tools/iio/iio_event_monitor.c b/kernel/tools/iio/iio_event_monitor.c index ac2de6b..d491b02 100644 --- a/kernel/tools/iio/iio_event_monitor.c +++ b/kernel/tools/iio/iio_event_monitor.c @@ -1,10 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0-only /* Industrialio event test code. * * Copyright (c) 2011-2012 Lars-Peter Clausen <lars@metafoo.de> - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 as published by - * the Free Software Foundation. * * This program is primarily intended as an example application. * Reads the current buffer setup from sysfs and starts a short capture @@ -60,6 +57,17 @@ [IIO_GRAVITY] = "gravity", [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[] = { @@ -69,12 +77,19 @@ [IIO_EV_TYPE_THRESH_ADAPTIVE] = "thresh_adaptive", [IIO_EV_TYPE_MAG_ADAPTIVE] = "mag_adaptive", [IIO_EV_TYPE_CHANGE] = "change", +#ifdef CONFIG_NO_GKI + [IIO_EV_TYPE_FIFO_FLUSH] = "fifo_flush", +#endif }; static const char * const iio_ev_dir_text[] = { [IIO_EV_DIR_EITHER] = "either", [IIO_EV_DIR_RISING] = "rising", - [IIO_EV_DIR_FALLING] = "falling" + [IIO_EV_DIR_FALLING] = "falling", +#ifdef CONFIG_NO_GKI + [IIO_EV_DIR_FIFO_EMPTY] = "empty", + [IIO_EV_DIR_FIFO_DATA] = "data", +#endif }; static const char * const iio_modifier_names[] = { @@ -114,7 +129,14 @@ [IIO_MOD_I] = "i", [IIO_MOD_Q] = "q", [IIO_MOD_CO2] = "co2", + [IIO_MOD_ETHANOL] = "ethanol", + [IIO_MOD_H2] = "h2", [IIO_MOD_VOC] = "voc", + [IIO_MOD_PM1] = "pm1", + [IIO_MOD_PM2P5] = "pm2p5", + [IIO_MOD_PM4] = "pm4", + [IIO_MOD_PM10] = "pm10", + [IIO_MOD_O2] = "o2", }; static bool event_is_known(struct iio_event_data *event) @@ -156,6 +178,7 @@ case IIO_GRAVITY: case IIO_POSITIONRELATIVE: case IIO_PHASE: + case IIO_MASSCONCENTRATION: break; default: return false; @@ -199,7 +222,14 @@ case IIO_MOD_I: case IIO_MOD_Q: case IIO_MOD_CO2: + case IIO_MOD_ETHANOL: + case IIO_MOD_H2: case IIO_MOD_VOC: + case IIO_MOD_PM1: + case IIO_MOD_PM2P5: + case IIO_MOD_PM4: + case IIO_MOD_PM10: + case IIO_MOD_O2: break; default: return false; -- Gitblit v1.6.2