Re: [RFC v1 2/3] iio: ph: add IIO_PH channel type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 10, 2015 at 2:40 AM, Peter Meerwald-Stadler
<pmeerw@xxxxxxxxxx> wrote:
>
>> Signed-off-by: Matt Ranostay <mranostay@xxxxxxxxx>
>> ---
>>  Documentation/ABI/testing/sysfs-bus-iio | 6 ++++++
>>  drivers/iio/industrialio-core.c         | 1 +
>>  include/uapi/linux/iio/types.h          | 1 +
>>  3 files changed, 8 insertions(+)
>>
>> diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
>> index 0439c2a..b15314e 100644
>> --- a/Documentation/ABI/testing/sysfs-bus-iio
>> +++ b/Documentation/ABI/testing/sysfs-bus-iio
>> @@ -1491,3 +1491,9 @@ 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@xxxxxxxxxxxxxxx
>> +Description:
>> +             Raw (unscaled no offset etc.) pH reading of a substance.
>
> what is the unit (after application of offset and scale?
> or otherwise state that this is unit-less

It will be floating point 0.0 to 14.0 with the pH level.  Which is the
log scale of hydronium (per litre) in a solution.

>
>> diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
>> index d42a8ff9..e1b9a9e 100644
>> --- a/drivers/iio/industrialio-core.c
>> +++ b/drivers/iio/industrialio-core.c
>> @@ -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[] = {
>> diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h
>> index 7c63bd6..c077617 100644
>> --- a/include/uapi/linux/iio/types.h
>> +++ b/include/uapi/linux/iio/types.h
>> @@ -37,6 +37,7 @@ enum iio_chan_type {
>>       IIO_VELOCITY,
>>       IIO_CONCENTRATION,
>>       IIO_RESISTANCE,
>> +     IIO_PH,
>>  };
>>
>>  enum iio_modifier {
>>
>
> --
>
> Peter Meerwald-Stadler
> +43-664-2444418 (mobile)
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux