[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250612100758.13241-2-surajsonawane0215@gmail.com>
Date: Thu, 12 Jun 2025 15:37:44 +0530
From: surajsonawane0215@...il.com
To: Jonathan Cameron <jic23@...nel.org>
Cc: David Lechner <dlechner@...libre.com>,
Nuno Sá <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
linux-iio@...r.kernel.org,
devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org,
surajsonawane0215@...il.com
Subject: [PATCH v2 1/3] iio: Add IIO_DENSITY channel type
From: Suraj Sonawane <surajsonawane0215@...il.com>
Add IIO_DENSITY channel type for particulate matter sensors,
with base units of grams per cubic meter (g/m³). This is needed
for optical dust sensors like the Sharp GP2Y1010AU0F that measure
airborne particle concentration rather than raw voltage.
Signed-off-by: Suraj Sonawane <surajsonawane0215@...il.com>
---
V2: Initial version introducing IIO_DENSITY channel type
Documentation/ABI/testing/sysfs-bus-iio | 8 ++++++++
include/uapi/linux/iio/types.h | 1 +
2 files changed, 9 insertions(+)
diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
index 190bfcc1e..9b1b538ce 100644
--- a/Documentation/ABI/testing/sysfs-bus-iio
+++ b/Documentation/ABI/testing/sysfs-bus-iio
@@ -2383,3 +2383,11 @@ Description:
Value representing the user's attention to the system expressed
in units as percentage. This usually means if the user is
looking at the screen or not.
+
+What: /sys/bus/iio/devices/iio:deviceX/in_density_raw
+KernelVersion: 6.15
+Contact: linux-iio@...r.kernel.org
+Description:
+ Raw reading from an optical dust sensor.
+ This value is proportional to dust density in air,
+ with base units of g/m^3.
+
diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h
index 3eb0821af..e7d09ec0b 100644
--- a/include/uapi/linux/iio/types.h
+++ b/include/uapi/linux/iio/types.h
@@ -37,6 +37,7 @@ enum iio_chan_type {
IIO_DISTANCE,
IIO_VELOCITY,
IIO_CONCENTRATION,
+ IIO_DENSITY,
IIO_RESISTANCE,
IIO_PH,
IIO_UVINDEX,
--
2.43.0
Powered by blists - more mailing lists