]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
IIO channel type and modifiers for CCT and RGBC data
authorJon Brenner <jbrenner@taosinc.com>
Wed, 16 May 2012 15:46:42 +0000 (10:46 -0500)
committerJonathan Cameron <jic23@kernel.org>
Tue, 10 Jul 2012 17:49:26 +0000 (18:49 +0100)
Add iio channel type and modifiers for Correlated Color Temperature (CCT)
and RGBC (red/green/blue/clear) data.
Add CCT and RGBC descriptions to documentation.

Changes:
Revised/condensed RGBC descriptions.

Merge and trivial fix done by Jonathan Cameron.

Signed-off-by: Jon Brenner <jbrenner@taosinc.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/industrialio-core.c
drivers/staging/iio/Documentation/sysfs-bus-iio-light
include/linux/iio/types.h

index bb3c692e49b88ff1e38ec0c784c49007c9b01090..2ec266ef41a38c7d2092041d931c872410fc5999 100644 (file)
@@ -64,6 +64,7 @@ static const char * const iio_chan_type_name_spec[] = {
        [IIO_TIMESTAMP] = "timestamp",
        [IIO_CAPACITANCE] = "capacitance",
        [IIO_ALTVOLTAGE] = "altvoltage",
+       [IIO_CCT] = "cct",
 };
 
 static const char * const iio_modifier_names[] = {
@@ -74,6 +75,10 @@ static const char * const iio_modifier_names[] = {
        [IIO_MOD_SUM_SQUARED_X_Y_Z] = "x^2+y^2+z^2",
        [IIO_MOD_LIGHT_BOTH] = "both",
        [IIO_MOD_LIGHT_IR] = "ir",
+       [IIO_MOD_LIGHT_CLEAR] = "clear",
+       [IIO_MOD_LIGHT_RED] = "red",
+       [IIO_MOD_LIGHT_GREEN] = "green",
+       [IIO_MOD_LIGHT_BLUE] = "blue",
 };
 
 /* relies on pairs of these shared then separate */
index d52be0385dc4e56cb66eecce4d39726e7f7b1496..a28919da13e3d0ace4c40d63beab8e2613e057c5 100644 (file)
@@ -82,3 +82,26 @@ Contact:     linux-iio@vger.kernel.org
 Description:
                This property gets/sets the table of coefficients
                used in calculating illuminance in lux.
+
+What:          /sys/bus/iio/devices/device[n]/in_intensity_clear[_input|_raw]
+What:          /sys/bus/iio/devices/device[n]/in_intensity_red[_input|_raw]
+What:          /sys/bus/iio/devices/device[n]/in_intensity_green[_input|_raw]
+What:          /sys/bus/iio/devices/device[n]/in_intensity_blue[_input|_raw]
+KernelVersion: 3.4.0
+Contact:       linux-iio@vger.kernel.org
+Description:
+               This property is supported by sensors that have a RGBC
+               sensing mode. This value should be the output from a reading
+               and if expressed in SI units, should include _input. If this
+               value is not in SI units (irradiance, uW/mm^2), then it should
+               include _raw.
+
+What:          /sys/bus/iio/devices/device[n]/in_cct0[_input|_raw]
+KernelVersion: 3.4.0
+Contact:       linux-iio@vger.kernel.org
+Description:
+               This should return the correlated color temperature from the
+               light sensor. If it comes back in SI units, it should also
+               include _input else it should include _raw to signify it is not
+               in SI units.
+
index e25040173346c16bfa8b21c488c96881f1ea999a..44e397705d7f5f0eecef6706daf2b993fbdd3ea7 100644 (file)
@@ -27,6 +27,7 @@ enum iio_chan_type {
        IIO_TIMESTAMP,
        IIO_CAPACITANCE,
        IIO_ALTVOLTAGE,
+       IIO_CCT,
 };
 
 enum iio_modifier {
@@ -46,6 +47,10 @@ enum iio_modifier {
        IIO_MOD_LIGHT_IR,
        IIO_MOD_ROOT_SUM_SQUARED_X_Y,
        IIO_MOD_SUM_SQUARED_X_Y_Z,
+       IIO_MOD_LIGHT_CLEAR,
+       IIO_MOD_LIGHT_RED,
+       IIO_MOD_LIGHT_GREEN,
+       IIO_MOD_LIGHT_BLUE,
 };
 
 #define IIO_VAL_INT 1