[PATCH v6 04/16] iio: add IIO_FREQUENCY channel type

From: Rodrigo Alencar via B4 Relay

Date: Thu Jun 18 2026 - 09:29:00 EST


From: Rodrigo Alencar <rodrigo.alencar@xxxxxxxxxx>

Add IIO_FREQUENCY channel type to support Direct Digital Synthesizer (DDS)
devices that handles frequency values written directly to its buffered
interface.

Signed-off-by: Rodrigo Alencar <rodrigo.alencar@xxxxxxxxxx>
---
drivers/iio/industrialio-core.c | 1 +
include/uapi/linux/iio/types.h | 1 +
tools/iio/iio_event_monitor.c | 2 ++
3 files changed, 4 insertions(+)

diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
index 93c2540d4cd2..f9fd353f79e1 100644
--- a/drivers/iio/industrialio-core.c
+++ b/drivers/iio/industrialio-core.c
@@ -99,6 +99,7 @@ static const char * const iio_chan_type_name_spec[] = {
[IIO_ATTENTION] = "attention",
[IIO_ALTCURRENT] = "altcurrent",
[IIO_COVERAGE] = "coverage",
+ [IIO_FREQUENCY] = "frequency",
};

static const char * const iio_modifier_names[] = {
diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h
index c9295c707041..1996839d1fce 100644
--- a/include/uapi/linux/iio/types.h
+++ b/include/uapi/linux/iio/types.h
@@ -54,6 +54,7 @@ enum iio_chan_type {
IIO_ATTENTION,
IIO_ALTCURRENT,
IIO_COVERAGE,
+ IIO_FREQUENCY,
};

enum iio_modifier {
diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c
index bc3ef4c77c2b..7885f0f7562e 100644
--- a/tools/iio/iio_event_monitor.c
+++ b/tools/iio/iio_event_monitor.c
@@ -66,6 +66,7 @@ static const char * const iio_chan_type_name_spec[] = {
[IIO_ATTENTION] = "attention",
[IIO_ALTCURRENT] = "altcurrent",
[IIO_COVERAGE] = "coverage",
+ [IIO_FREQUENCY] = "frequency",
};

static const char * const iio_ev_type_text[] = {
@@ -196,6 +197,7 @@ static bool event_is_known(struct iio_event_data *event)
case IIO_ATTENTION:
case IIO_ALTCURRENT:
case IIO_COVERAGE:
+ case IIO_FREQUENCY:
break;
default:
return false;

--
2.43.0