iio: ph: add IIO_PH channel type
authorMatt Ranostay <mranostay@gmail.com>
Wed, 27 Jan 2016 02:34:30 +0000 (18:34 -0800)
committerJonathan Cameron <jic23@kernel.org>
Sat, 30 Jan 2016 16:27:17 +0000 (16:27 +0000)
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Documentation/ABI/testing/sysfs-bus-iio
drivers/iio/industrialio-core.c
include/uapi/linux/iio/types.h

index 8fadd272ad8ae152f52817e245d1c924c86340aa..80c6fce9935bf28e000a795deff67d64ab6f7142 100644 (file)
@@ -1493,3 +1493,10 @@ Description:
                This ABI is especially applicable for humidity sensors
                to heatup the device and get rid of any condensation
                in some humidity environment
+
+What:          /sys/bus/iio/devices/iio:deviceX/in_ph_raw
+KernelVersion: 4.5
+Contact:       linux-iio@vger.kernel.org
+Description:
+               Raw (unscaled no offset etc.) pH reading of a substance as a negative
+               base-10 logarithm of hydrodium ions in a litre of water.
index fd01f3493fc7792792d015c604903197ba506073..eb01a83a5b7c1c76804eb8d0b9b2fe1330281eb2 100644 (file)
@@ -77,6 +77,7 @@ static const char * const iio_chan_type_name_spec[] = {
        [IIO_VELOCITY] = "velocity",
        [IIO_CONCENTRATION] = "concentration",
        [IIO_RESISTANCE] = "resistance",
+       [IIO_PH] = "ph",
 };
 
 static const char * const iio_modifier_names[] = {
index 7c63bd67c36e274f933a857b23ee00e5e1c2daed..c077617f3304355d2d465e3760a5f46f5de2bbb9 100644 (file)
@@ -37,6 +37,7 @@ enum iio_chan_type {
        IIO_VELOCITY,
        IIO_CONCENTRATION,
        IIO_RESISTANCE,
+       IIO_PH,
 };
 
 enum iio_modifier {