diff options
author | Andrea Merello <andrea.merello@gmail.com> | 2019-11-20 15:47:54 +0100 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2019-11-23 13:42:16 +0100 |
commit | ea4103070f03f789f305bdd1803d5d4c42f0b3b9 (patch) | |
tree | 394023719552c29f17a1311beeef56aa845204f2 /lib/genalloc.c | |
parent | Documentation: ABI: document IIO thermocouple_type file (diff) | |
download | linux-ea4103070f03f789f305bdd1803d5d4c42f0b3b9.tar.xz linux-ea4103070f03f789f305bdd1803d5d4c42f0b3b9.zip |
iio: max31856: add support for runtime-configuring the thermocouple type
The sensor support various thermocouple types (e.g. J, K, N, ...). The
driver allows to configure this parameter using a DT property.
This is useful when i.e. the thermocouple is physically tied to the sensor
and it is usually not removed, or when it is at least known in advance
which sensor will be connected to the circuit.
However, if the user can randomly connect any kind of thermocouples (i.e.
the device exposes a connector, and the user is free to connect its own
sensors), it would be more appropriate to provide a mechanism to
dynamically switch from one thermocouple type to another. This can be i.e.
handled in userspace by a GUI, a configuration file or a program that
detects the thermocouple type by reading a GPIO, or a eeprom on the probe,
or whatever.
This patch adds a IIO attribute that can be used to override, at run-time,
the DT-provided setting (which serves as default).
Cc: Hartmut Knaack <knaack.h@gmx.de>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Cc: Colin Ian King <colin.king@canonical.com>
Cc: Patrick Havelange <patrick.havelange@essensium.com>
Cc: Matt Weber <matthew.weber@rockwellcollins.com>
Cc: Matt Ranostay <matt.ranostay@konsulko.com>
Cc: Chuhong Yuan <hslester96@gmail.com>
Cc: Daniel Gomez <dagmcr@gmail.com>
Cc: linux-iio@vger.kernel.org
Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'lib/genalloc.c')
0 files changed, 0 insertions, 0 deletions