Skip to content

Commit ecb3a7c

Browse files
mranostayjic23
authored andcommitted
iio: ph: add IIO_PH channel type
Signed-off-by: Matt Ranostay <mranostay@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
1 parent 5f9c95d commit ecb3a7c

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

‎Documentation/ABI/testing/sysfs-bus-iio‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1493,3 +1493,10 @@ Description:
14931493
This ABI is especially applicable for humidity sensors
14941494
to heatup the device and get rid of any condensation
14951495
in some humidity environment
1496+
1497+
What: /sys/bus/iio/devices/iio:deviceX/in_ph_raw
1498+
KernelVersion: 4.5
1499+
Contact: linux-iio@vger.kernel.org
1500+
Description:
1501+
Raw (unscaled no offset etc.) pH reading of a substance as a negative
1502+
base-10 logarithm of hydrodium ions in a litre of water.

‎drivers/iio/industrialio-core.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ static const char * const iio_chan_type_name_spec[] = {
7777
[IIO_VELOCITY] = "velocity",
7878
[IIO_CONCENTRATION] = "concentration",
7979
[IIO_RESISTANCE] = "resistance",
80+
[IIO_PH] = "ph",
8081
};
8182

8283
static const char * const iio_modifier_names[] = {

‎include/uapi/linux/iio/types.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ enum iio_chan_type {
3737
IIO_VELOCITY,
3838
IIO_CONCENTRATION,
3939
IIO_RESISTANCE,
40+
IIO_PH,
4041
};
4142

4243
enum iio_modifier {

0 commit comments

Comments
 (0)